pub enum Innards {
Struct {
fields: &'static [Field],
},
TupleStruct {
fields: &'static [Field],
},
Tuple {
fields: &'static [Field],
},
Map {
vtable: MapVTable,
value_shape: ShapeDesc,
},
List {
vtable: ListVTable,
item_shape: ShapeDesc,
},
Transparent(ShapeDesc),
Scalar(Scalar),
Enum {
variants: &'static [Variant],
repr: EnumRepr,
},
}
Expand description
The shape of a schema: is it more map-shaped, array-shaped, scalar-shaped?
Variants§
Struct
Struct with statically-known, named fields
e.g. struct Struct { field: u32 }
TupleStruct
Tuple-struct, with numbered fields
e.g. struct TupleStruct(u32, u32);
Tuple
Tuple, with numbered fields
e.g. (u32, u32);
Map
Map — keys are dynamic (and strings, sorry), values are homogeneous
e.g. Map<String, T>
Fields
List
Ordered list of heterogenous values, variable size
e.g. Vec<T>
Fields
§
vtable: ListVTable
vtable for interacting with the list
Transparent(ShapeDesc)
Transparent — forwards to another known schema
e.g. #[repr(transparent)] struct Transparent<T>(T);
Scalar(Scalar)
Scalar — known based type
e.g. u32
, String
, bool
Enum
Enum with variants
e.g. enum Enum { Variant1, Variant2 }
Trait Implementations§
impl Copy for Innards
impl Eq for Innards
impl StructuralPartialEq for Innards
Auto Trait Implementations§
impl Freeze for Innards
impl RefUnwindSafe for Innards
impl Send for Innards
impl Sync for Innards
impl Unpin for Innards
impl UnwindSafe for Innards
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