pub struct Field<'meta, 'data> { /* private fields */ }Expand description
A decoded field yielded by Fields.
The field borrows its metadata from the decoder’s schema and its value from the encoded input data.
Implementations§
Source§impl<'meta, 'data> Field<'meta, 'data>
impl<'meta, 'data> Field<'meta, 'data>
Sourcepub const fn size(&self) -> Option<usize>
pub const fn size(&self) -> Option<usize>
Returns the field’s complete encoded size when it is fixed.
The size uses wincode’s default configuration. None means the field’s
size depends on its value, as it does for strings and vectors.
Sourcepub fn into_value(self) -> Value<'data>
pub fn into_value(self) -> Value<'data>
Consumes the field and returns its decoded value.
Trait Implementations§
Auto Trait Implementations§
impl<'meta, 'data> Freeze for Field<'meta, 'data>
impl<'meta, 'data> RefUnwindSafe for Field<'meta, 'data>
impl<'meta, 'data> Send for Field<'meta, 'data>
impl<'meta, 'data> Sync for Field<'meta, 'data>
impl<'meta, 'data> Unpin for Field<'meta, 'data>
impl<'meta, 'data> UnsafeUnpin for Field<'meta, 'data>
impl<'meta, 'data> UnwindSafe for Field<'meta, 'data>
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