pub struct Bag<'a> { /* private fields */ }Expand description
A bag of keyed values, read in place: items are decoded only as they are iterated.
Implementations§
Source§impl<'a> Bag<'a>
impl<'a> Bag<'a>
Sourcepub fn parent(&self) -> Option<ResourceId>
pub fn parent(&self) -> Option<ResourceId>
The bag this one inherits from, such as a style’s parent.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn items(&self) -> impl ExactSizeIterator<Item = (ResourceId, Value)> + 'a
pub fn items(&self) -> impl ExactSizeIterator<Item = (ResourceId, Value)> + 'a
Each item’s key (an attribute or index) and value.
Trait Implementations§
impl<'a> Copy for Bag<'a>
impl<'a> StructuralPartialEq for Bag<'a>
Auto Trait Implementations§
impl<'a> Freeze for Bag<'a>
impl<'a> RefUnwindSafe for Bag<'a>
impl<'a> Send for Bag<'a>
impl<'a> Sync for Bag<'a>
impl<'a> Unpin for Bag<'a>
impl<'a> UnsafeUnpin for Bag<'a>
impl<'a> UnwindSafe for Bag<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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