pub enum DataModelType {
Show 29 variants
Bool,
I8,
U8,
I16,
I32,
I64,
I128,
U16,
U32,
U64,
U128,
Usize,
Isize,
F32,
F64,
Char,
String,
ByteArray,
Option(&'static NamedType),
Unit,
UnitStruct,
NewtypeStruct(&'static NamedType),
Seq(&'static NamedType),
Tuple(&'static [&'static NamedType]),
TupleStruct(&'static [&'static NamedType]),
Map {
key: &'static NamedType,
val: &'static NamedType,
},
Struct(&'static [&'static NamedValue]),
Enum(&'static [&'static NamedVariant]),
Schema,
}Expand description
This enum lists which of the Data Model Types apply to a given type. This describes how the type is encoded on the wire.
This enum contains all Serde Data Model types other than enum variants which exist in
DataModelVariant, as well as a “Schema” Model Type, which maps to NamedType.
Variants§
Bool
The bool Serde Data Model Type
I8
The i8 Serde Data Model Type
U8
The u8 Serde Data Model Type
I16
A variably encoded i16
I32
A variably encoded i32
I64
A variably encoded i64
I128
A variably encoded i128
U16
A variably encoded u16
U32
A variably encoded u32
U64
A variably encoded u64
U128
A variably encoded u128
Usize
A variably encoded usize
Isize
A variably encoded isize
F32
The f32 Serde Data Model Type
F64
The `f64 Serde Data Model Type
Char
The char Serde Data Model Type
String
The String Serde Data Model Type
ByteArray
The &[u8] Serde Data Model Type
Option(&'static NamedType)
The Option<T> Serde Data Model Type
Unit
The () Serde Data Model Type
UnitStruct
The “unit struct” Serde Data Model Type
NewtypeStruct(&'static NamedType)
The “newtype struct” Serde Data Model Type
Seq(&'static NamedType)
The “Sequence” Serde Data Model Type
Tuple(&'static [&'static NamedType])
The “Tuple” Serde Data Model Type
TupleStruct(&'static [&'static NamedType])
The “Tuple Struct” Serde Data Model Type
Map
The “Map” Serde Data Model Type
Struct(&'static [&'static NamedValue])
The “Struct” Serde Data Model Type
Enum(&'static [&'static NamedVariant])
The “Enum” Serde Data Model Type (which contains any of the “Variant” types)
Schema
A NamedType/OwnedNamedType
Trait Implementations§
Source§impl Clone for DataModelType
impl Clone for DataModelType
Source§fn clone(&self) -> DataModelType
fn clone(&self) -> DataModelType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataModelType
impl Debug for DataModelType
Source§impl From<&DataModelType> for OwnedDataModelType
impl From<&DataModelType> for OwnedDataModelType
Source§fn from(other: &DataModelType) -> Self
fn from(other: &DataModelType) -> Self
Source§impl Hash for DataModelType
impl Hash for DataModelType
Source§impl PartialEq for DataModelType
impl PartialEq for DataModelType
Source§impl Serialize for DataModelType
impl Serialize for DataModelType
impl Copy for DataModelType
impl Eq for DataModelType
impl StructuralPartialEq for DataModelType
Auto Trait Implementations§
impl Freeze for DataModelType
impl RefUnwindSafe for DataModelType
impl Send for DataModelType
impl Sync for DataModelType
impl Unpin for DataModelType
impl UnwindSafe for DataModelType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.