pub struct AttributeStorage<'bp>(/* private fields */);
Implementations§
Source§impl<'bp> AttributeStorage<'bp>
impl<'bp> AttributeStorage<'bp>
pub fn empty() -> Self
Sourcepub fn get(&self, id: Key) -> &Attributes<'bp>
pub fn get(&self, id: Key) -> &Attributes<'bp>
Get a reference to attributes by widget id
Sourcepub fn try_get(&self, id: Key) -> Option<&Attributes<'bp>>
pub fn try_get(&self, id: Key) -> Option<&Attributes<'bp>>
Get a reference to attributes by widget id
Sourcepub fn get_mut(&mut self, id: Key) -> &mut Attributes<'bp>
pub fn get_mut(&mut self, id: Key) -> &mut Attributes<'bp>
Get a mutable reference to attributes by widget id
pub fn with_mut<F, O>(&mut self, widget_id: Key, f: F) -> Option<O>where
F: FnOnce(&mut Attributes<'bp>, &mut Self) -> O,
Sourcepub fn insert(&mut self, widget_id: Key, attribs: Attributes<'bp>)
pub fn insert(&mut self, widget_id: Key, attribs: Attributes<'bp>)
Insert attributes for a given widget.
This will overwrite any existing attributes at that location
Sourcepub fn try_remove(&mut self, id: Key) -> Option<Attributes<'bp>>
pub fn try_remove(&mut self, id: Key) -> Option<Attributes<'bp>>
Try to remove attributes for a specific widget
Trait Implementations§
Auto Trait Implementations§
impl<'bp> Freeze for AttributeStorage<'bp>
impl<'bp> !RefUnwindSafe for AttributeStorage<'bp>
impl<'bp> !Send for AttributeStorage<'bp>
impl<'bp> !Sync for AttributeStorage<'bp>
impl<'bp> Unpin for AttributeStorage<'bp>
impl<'bp> !UnwindSafe for AttributeStorage<'bp>
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