pub enum TypeKind {
Primitive(PrimitiveType),
Struct(StructType),
Enum(EnumType),
Newtype(NewtypeType),
Tuple(Vec<TypeRef>),
Array(Box<TypeRef>),
Option(Box<TypeRef>),
Result {
ok: Box<TypeRef>,
err: Box<TypeRef>,
},
Map {
key: Box<TypeRef>,
value: Box<TypeRef>,
},
Reference(TypeRef),
}Expand description
型の種類
Variants§
Primitive(PrimitiveType)
プリミティブ型 (i32, String, etc.)
Struct(StructType)
構造体
Enum(EnumType)
列挙型
Newtype(NewtypeType)
新型パターン (tuple struct with single field)
Tuple(Vec<TypeRef>)
タプル
Array(Box<TypeRef>)
配列/Vec
Option(Box<TypeRef>)
Option<T>
Result
Result<T, E>
Map
HashMap<K, V>
Reference(TypeRef)
型参照
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TypeKind
impl<'de> Deserialize<'de> for TypeKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TypeKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TypeKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TypeKind
impl Serialize for TypeKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for TypeKind
impl RefUnwindSafe for TypeKind
impl Send for TypeKind
impl Sync for TypeKind
impl Unpin for TypeKind
impl UnwindSafe for TypeKind
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