pub struct ConstFields<'a> { /* private fields */ }Expand description
The fields of an instance or the values of an object.
A field is a subtree rather than an element, so this is a view over the run which holds them all rather than a slice of them.
Implementations§
Source§impl<'a> ConstFields<'a>
impl<'a> ConstFields<'a>
Sourcepub fn get(&self, index: usize) -> Option<&'a ConstValue>
pub fn get(&self, index: usize) -> Option<&'a ConstValue>
Get the field at index.
This walks past the fields before it, since a field is as long as the subtree it is.
Sourcepub fn iter(&self) -> ConstFieldsIter<'a> ⓘ
pub fn iter(&self) -> ConstFieldsIter<'a> ⓘ
Iterate over the fields in order.
Trait Implementations§
Source§impl<'a> Clone for ConstFields<'a>
impl<'a> Clone for ConstFields<'a>
Source§fn clone(&self) -> ConstFields<'a>
fn clone(&self) -> ConstFields<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ConstFields<'a>
Source§impl Debug for ConstFields<'_>
impl Debug for ConstFields<'_>
Source§impl<'a> IntoIterator for ConstFields<'a>
impl<'a> IntoIterator for ConstFields<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConstFields<'a>
impl<'a> RefUnwindSafe for ConstFields<'a>
impl<'a> Send for ConstFields<'a>
impl<'a> Sync for ConstFields<'a>
impl<'a> Unpin for ConstFields<'a>
impl<'a> UnsafeUnpin for ConstFields<'a>
impl<'a> UnwindSafe for ConstFields<'a>
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