pub(crate) trait Attribute: Debug + 'static {
    fn attr_id(&self) -> &'static str;
    fn requires(&self) -> Vec<Box<dyn Attribute>> ;
    fn derive(&self, model: &mut Model, box_id: BoxId);
}
Expand description

A trait that defines the logic for deriving an attribute.

Required Methods§

A globally unique identifier for this attribute type.

A vector of attributes that need to be derived before this attribute.

A function that derives at a specific BoxId.

Trait Implementations§

A naive Hash for attributes that delegates to the associated std::any::TypeId.

Feeds this value into the given Hasher. Read more

A naive PartialEq implementation for Attribute trait objects that differentiates two attributes based on their std::any::TypeId.

This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

An evidence that the PartialEq implementation for Attribute is an equivalence relation.

Implementors§