pub struct Field {
pub name: &'static str,
pub shape: ShapeDesc,
pub offset: usize,
}
Fields§
§name: &'static str
key for the map field
shape: ShapeDesc
schema of the inner type
offset: usize
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 Copy for Field
impl Eq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnwindSafe for Field
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