pub enum TypeStructure<'a, F: Deref<Target = [Field<'a>]> = &'a [Field<'a>], V: Deref<Target = [Variant<'a, F>]> = &'a [Variant<'a, F>]> {
Primitive,
Struct {
repr: &'a str,
fields: F,
},
Union {
repr: &'a str,
fields: F,
},
Enum {
repr: &'a str,
variants: V,
},
}
Expand description
Description of the shallow structure of a type.
Variants§
Primitive
A primitive type, e.g. ()
, u8
, *const i32
, &mut bool
, [char; 4]
, or fn(f32) -> !
.
Struct
A struct-like type, including unit structs, tuple structs, structs, and tuples.
Fields
§
fields: F
The fields of the struct.
Union
A union type.
Fields
§
fields: F
The fields of the union.
Enum
An enum type.
Trait Implementations§
Source§impl<'a, F: Clone + Deref<Target = [Field<'a>]>, V: Clone + Deref<Target = [Variant<'a, F>]>> Clone for TypeStructure<'a, F, V>
impl<'a, F: Clone + Deref<Target = [Field<'a>]>, V: Clone + Deref<Target = [Variant<'a, F>]>> Clone for TypeStructure<'a, F, V>
Source§fn clone(&self) -> TypeStructure<'a, F, V>
fn clone(&self) -> TypeStructure<'a, F, V>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, F: Debug + Deref<Target = [Field<'a>]>, V: Debug + Deref<Target = [Variant<'a, F>]>> Debug for TypeStructure<'a, F, V>
impl<'a, F: Debug + Deref<Target = [Field<'a>]>, V: Debug + Deref<Target = [Variant<'a, F>]>> Debug for TypeStructure<'a, F, V>
Source§impl<'de: 'a, 'a, F, V> Deserialize<'de> for TypeStructure<'a, F, V>where
F: Deserialize<'de> + Deref<Target = [Field<'a>]>,
V: Deserialize<'de> + Deref<Target = [Variant<'a, F>]>,
impl<'de: 'a, 'a, F, V> Deserialize<'de> for TypeStructure<'a, F, V>where
F: Deserialize<'de> + Deref<Target = [Field<'a>]>,
V: Deserialize<'de> + Deref<Target = [Variant<'a, F>]>,
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
Source§impl<'a, F: Hash + Deref<Target = [Field<'a>]>, V: Hash + Deref<Target = [Variant<'a, F>]>> Hash for TypeStructure<'a, F, V>
impl<'a, F: Hash + Deref<Target = [Field<'a>]>, V: Hash + Deref<Target = [Variant<'a, F>]>> Hash for TypeStructure<'a, F, V>
Source§impl<'a, F: Ord + Deref<Target = [Field<'a>]>, V: Ord + Deref<Target = [Variant<'a, F>]>> Ord for TypeStructure<'a, F, V>
impl<'a, F: Ord + Deref<Target = [Field<'a>]>, V: Ord + Deref<Target = [Variant<'a, F>]>> Ord for TypeStructure<'a, F, V>
Source§fn cmp(&self, other: &TypeStructure<'a, F, V>) -> Ordering
fn cmp(&self, other: &TypeStructure<'a, F, V>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, F: PartialEq + Deref<Target = [Field<'a>]>, V: PartialEq + Deref<Target = [Variant<'a, F>]>> PartialEq for TypeStructure<'a, F, V>
impl<'a, F: PartialEq + Deref<Target = [Field<'a>]>, V: PartialEq + Deref<Target = [Variant<'a, F>]>> PartialEq for TypeStructure<'a, F, V>
Source§impl<'a, F: PartialOrd + Deref<Target = [Field<'a>]>, V: PartialOrd + Deref<Target = [Variant<'a, F>]>> PartialOrd for TypeStructure<'a, F, V>
impl<'a, F: PartialOrd + Deref<Target = [Field<'a>]>, V: PartialOrd + Deref<Target = [Variant<'a, F>]>> PartialOrd for TypeStructure<'a, F, V>
Source§impl<'a, F, V> Serialize for TypeStructure<'a, F, V>
impl<'a, F, V> Serialize for TypeStructure<'a, F, V>
impl<'a, F: Copy + Deref<Target = [Field<'a>]>, V: Copy + Deref<Target = [Variant<'a, F>]>> Copy for TypeStructure<'a, F, V>
impl<'a, F: Eq + Deref<Target = [Field<'a>]>, V: Eq + Deref<Target = [Variant<'a, F>]>> Eq for TypeStructure<'a, F, V>
impl<'a, F: Deref<Target = [Field<'a>]>, V: Deref<Target = [Variant<'a, F>]>> StructuralPartialEq for TypeStructure<'a, F, V>
Auto Trait Implementations§
impl<'a, F, V> Freeze for TypeStructure<'a, F, V>
impl<'a, F, V> RefUnwindSafe for TypeStructure<'a, F, V>where
F: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, F, V> Send for TypeStructure<'a, F, V>
impl<'a, F, V> Sync for TypeStructure<'a, F, V>
impl<'a, F, V> Unpin for TypeStructure<'a, F, V>
impl<'a, F, V> UnwindSafe for TypeStructure<'a, F, V>where
F: UnwindSafe,
V: UnwindSafe,
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