Trait

Named surface set that implementers must provide

Infrastructure · Data Structures · bootstrap 0.11.0

Mechanism

A marker interface: a named set of surfaces a pattern requires of anything claiming it, so a caller can invoke across implementations without knowing which one it holds. A Trait has no instances of its own — it is claimed by other patterns, which supply the surfaces it names. Distinct from Protocol, which is a Trait whose exchange must hold between two or more parties, and from Contract, which is a signed agreement rather than a type claim.

Invariants

Failure modes

Where this came from

—

Builds on

Used by

Identity