pub struct PeekStruct<'mem> { /* private fields */ }Expand description
Lets you read from a struct (implements read-only struct operations)
Implementations§
Source§impl<'mem> PeekStruct<'mem>
impl<'mem> PeekStruct<'mem>
Sourcepub fn field_count(&self) -> usize
pub fn field_count(&self) -> usize
Returns the number of fields in this struct
Sourcepub fn field(&self, index: usize) -> Result<Peek<'mem>, FieldError>
pub fn field(&self, index: usize) -> Result<Peek<'mem>, FieldError>
Returns the value of the field at the given index
Sourcepub fn field_by_name(&self, name: &str) -> Result<Peek<'mem>, FieldError>
pub fn field_by_name(&self, name: &str) -> Result<Peek<'mem>, FieldError>
Gets the value of the field with the given name
Trait Implementations§
Source§impl<'mem> Clone for PeekStruct<'mem>
impl<'mem> Clone for PeekStruct<'mem>
Source§fn clone(&self) -> PeekStruct<'mem>
fn clone(&self) -> PeekStruct<'mem>
Returns a copy 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 moreimpl<'mem> Copy for PeekStruct<'mem>
Auto Trait Implementations§
impl<'mem> Freeze for PeekStruct<'mem>
impl<'mem> RefUnwindSafe for PeekStruct<'mem>
impl<'mem> Send for PeekStruct<'mem>
impl<'mem> Sync for PeekStruct<'mem>
impl<'mem> Unpin for PeekStruct<'mem>
impl<'mem> UnwindSafe for PeekStruct<'mem>
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