pub enum TypeSchema {
Show 26 variants
Unit,
Bool,
I8,
I16,
I32,
I64,
I128,
Isize,
U8,
U16,
U32,
U64,
U128,
Usize,
F32,
F64,
Char,
Str,
Bytes,
Opaque,
Seq(&'static TypeSchema),
Map(&'static TypeSchema),
Optional(&'static TypeSchema),
Tuple(&'static [TypeSchema]),
Struct(&'static StructSchema),
Enum(&'static EnumSchema),
}Expand description
Compile-time description of a type’s structure.
Copy and reference-only, so it can be constructed in const context.
Variants§
Unit
Unit ((), unit structs, unit variants).
Bool
bool
I8
i8
I16
i16
I32
i32
I64
i64
I128
i128
Isize
isize
U8
u8
U16
u16
U32
u32
U64
u64
U128
u128
Usize
usize
F32
f32
F64
f64
Char
char
Str
string (String / &str / Cow<str>)
Bytes
byte sequence (&[u8])
Opaque
unknown / opaque type (e.g. skip_serializing fields)
Seq(&'static TypeSchema)
sequence (Vec<T>, [T; N], slices)
Map(&'static TypeSchema)
map (HashMap<K, V> etc.), describing the value type
Optional(&'static TypeSchema)
Option<T>
Tuple(&'static [TypeSchema])
fixed-size tuple
Struct(&'static StructSchema)
struct
Enum(&'static EnumSchema)
enum
Implementations§
Trait Implementations§
Source§impl Clone for TypeSchema
impl Clone for TypeSchema
Source§fn clone(&self) -> TypeSchema
fn clone(&self) -> TypeSchema
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TypeSchema
Source§impl Debug for TypeSchema
impl Debug for TypeSchema
impl Eq for TypeSchema
Source§impl PartialEq for TypeSchema
impl PartialEq for TypeSchema
impl StructuralPartialEq for TypeSchema
Auto Trait Implementations§
impl Freeze for TypeSchema
impl RefUnwindSafe for TypeSchema
impl Send for TypeSchema
impl Sync for TypeSchema
impl Unpin for TypeSchema
impl UnsafeUnpin for TypeSchema
impl UnwindSafe for TypeSchema
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