pub enum TypeDef {
Show 25 variants
Bool,
U8,
U16,
U32,
U64,
U128,
I8,
I16,
I32,
I64,
I128,
Char,
Str,
Bytes,
Sequence(TypeId),
Map(TypeId, TypeId),
Array(TypeId, u32),
Tuple(Vec<TypeId>),
StructUnit,
StructNewType(TypeId),
StructTuple(Vec<TypeId>),
Struct(Vec<Field>),
Variant(VariantDef),
Compact(TypeId),
BitSequence(TypeId, TypeId),
}Expand description
Type definitions that map directly to serde’s data model.
Variants§
Bool
U8
U16
U32
U64
U128
I8
I16
I32
I64
I128
Char
Str
Bytes
Vec<u8> serialized as raw bytes
Sequence(TypeId)
Homogeneous sequence with compact-length prefix
Map(TypeId, TypeId)
BTreeMap<K, V>
Array(TypeId, u32)
Fixed-length array [T; N]
Tuple(Vec<TypeId>)
Heterogeneous tuple (T1, T2, ...)
StructUnit
Unit struct (zero fields)
StructNewType(TypeId)
Newtype struct Foo(T)
StructTuple(Vec<TypeId>)
Tuple struct Foo(T1, T2, ...)
Struct(Vec<Field>)
Named-field struct
Variant(VariantDef)
Enum type
Compact(TypeId)
Compact-encoded integer
BitSequence(TypeId, TypeId)
Bit sequence (store, order type IDs)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TypeDef
impl<'de> Deserialize<'de> for TypeDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TypeDef
impl RefUnwindSafe for TypeDef
impl Send for TypeDef
impl Sync for TypeDef
impl Unpin for TypeDef
impl UnsafeUnpin for TypeDef
impl UnwindSafe for TypeDef
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