pub struct Field<'s> {
pub name: &'s str,
pub shape: ShapeDesc,
pub offset: Option<NonMaxU32>,
}
Fields§
§name: &'s str
key for the map field
shape: ShapeDesc
schema of the inner type
offset: Option<NonMaxU32>
offset of the field in the map, if known.
For example, when deserializing a self-descriptive format like JSON, we’re going to get some map fields with dynamically discovered field names, and they’re not going to have an offset.
However, when deserializing formats that are non-self descriptive and working from an existing shape, then their map fields are probably going to have offsets, especially if they’re using derived macros.
Trait Implementations§
impl<'s> Copy for Field<'s>
impl<'s> Eq for Field<'s>
impl<'s> StructuralPartialEq for Field<'s>
Auto Trait Implementations§
impl<'s> Freeze for Field<'s>
impl<'s> RefUnwindSafe for Field<'s>
impl<'s> Send for Field<'s>
impl<'s> Sync for Field<'s>
impl<'s> Unpin for Field<'s>
impl<'s> UnwindSafe for Field<'s>
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