Skip to content

Glossary: Software Design Patterns in Rust

Has-a / is-a

Also written: has-a, is-a

The test for choosing composition or inheritance: a product *has a* pricing rule (compose), while an error *is a* kind of Error (trait). Rust has no inheritance.

Where the book teaches it

Related terms

CompositionInheritance