pub enum Type {
Prim(Prim),
Optional(Box<Type>),
List(Box<Type>),
Map(Box<Type>, Box<Type>),
Struct {
name: String,
fields: Vec<(String, Type)>,
},
Enum {
name: String,
variants: Vec<String>,
},
Vector {
dim: u32,
metric: String,
},
Ref(String),
}Expand description
A description, parsed.
Variants§
Prim(Prim)
A primitive.
Optional(Box<Type>)
An optional value.
List(Box<Type>)
A sequence.
Map(Box<Type>, Box<Type>)
A mapping.
Struct
A struct with its fields in declaration order.
Fields
Enum
An enumeration with its variants in declaration order.
Vector
A vector of a fixed width, compared one way.
Fields
Ref(String)
A reference back to a struct that encloses this one.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnsafeUnpin for Type
impl UnwindSafe for Type
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