[−][src]Trait atelier_core::model::Annotated
A trait implemented by model elements that may have traits applied to them.
Required methods
fn has_traits(&self) -> bool
Returns true
if the model element has any applied traits, else false
.
fn has_trait(&self, id: &ShapeID) -> bool
Returns true
if the model element has any applied traits with the associated id, else false
.
fn traits(&self) -> &Vec<Trait>
Return an iterator over all traits applied to this model element
fn add_trait(&mut self, a_trait: Trait)
Add a new trait to this model element.
fn remove_trait(&mut self, id: &ShapeID)
Remove any trait from this model element with the provided id.
Provided methods
fn append_traits(&mut self, traits: &[Trait])
Add all the traits to this model element.
fn documentation(&mut self, doc: &str)
A short-cut to add the standard documentation trait.