Trait dipstick::WithAttributes
source · pub trait WithAttributes: Clone {
fn get_attributes(&self) -> &Attributes;
fn mut_attributes(&mut self) -> &mut Attributes;
fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self { ... }
}
Expand description
This trait should not be exposed outside the crate.
Required Methods§
sourcefn get_attributes(&self) -> &Attributes
fn get_attributes(&self) -> &Attributes
Return attributes of component.
sourcefn mut_attributes(&mut self) -> &mut Attributes
fn mut_attributes(&mut self) -> &mut Attributes
Return attributes of component for mutation.
Provided Methods§
sourcefn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
fn with_attributes<F: Fn(&mut Attributes)>(&self, edit: F) -> Self
Clone the component and mutate its attributes at once.