pub struct AttributeBase { /* private fields */ }
Expand description
Base implementation of the Attribute trait that can be extended by concrete attribute types.
Implementations§
Source§impl AttributeBase
impl AttributeBase
Sourcepub fn new(name: CheetahString, changeable: bool) -> Self
pub fn new(name: CheetahString, changeable: bool) -> Self
Create a new attribute base with the given name and changeability.
Sourcepub fn name(&self) -> &CheetahString
pub fn name(&self) -> &CheetahString
Get the name of this attribute.
Sourcepub fn set_name(&mut self, name: CheetahString)
pub fn set_name(&mut self, name: CheetahString)
Set a new name for this attribute.
Sourcepub fn is_changeable(&self) -> bool
pub fn is_changeable(&self) -> bool
Check if this attribute can be changed after creation.
Sourcepub fn set_changeable(&mut self, changeable: bool)
pub fn set_changeable(&mut self, changeable: bool)
Set whether this attribute can be changed.
Trait Implementations§
Source§impl Clone for AttributeBase
impl Clone for AttributeBase
Source§fn clone(&self) -> AttributeBase
fn clone(&self) -> AttributeBase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !Freeze for AttributeBase
impl RefUnwindSafe for AttributeBase
impl Send for AttributeBase
impl Sync for AttributeBase
impl Unpin for AttributeBase
impl UnwindSafe for AttributeBase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more