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§
Trait Implementations§
source§impl Hash for dyn Attribute
impl Hash for dyn Attribute
A naive Hash
for attributes that delegates to the associated
std::any::TypeId
.
source§impl PartialEq<dyn Attribute + 'static> for dyn Attribute
impl PartialEq<dyn Attribute + 'static> for dyn Attribute
A naive PartialEq
implementation for Attribute
trait objects that
differentiates two attributes based on their std::any::TypeId
.