#[non_exhaustive]pub enum Typing<Validation = AlwaysValid> {
None,
Common(UniversalType),
Extension(ExtensionType),
Named(String),
Path {
absolute: bool,
path: Vec<String>,
name: String,
},
Option(Box<Self>),
Tuple(Vec<Self>),
Array(usize, Box<Self>),
Vec(Box<Self>),
Set(Box<Self>),
Map(Box<Self>, Box<Self>),
Foreign(Box<Self>),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
The none
type.
Common(UniversalType)
Universal types in almost every language.
See UniversalType
Extension(ExtensionType)
Common types hard to describe with normal data structures.
Prefixed with +
.
i.e. +datetime
, +rgba
, +uuid
See ExtensionType
Named(String)
A named type, with its contents defined elsewhere.
Path
A type with a path.
Fields
Option(Box<Self>)
An optional or nullable type.
Tuple(Vec<Self>)
A nameless product type deliminated with comma.
i.e. (int,string,char)
Array(usize, Box<Self>)
A fix sized array.
i.e. [10]int
Vec(Box<Self>)
A variable sized array.
i.e. []int
Set(Box<Self>)
A set of keys.
i.e. [int]
Map(Box<Self>, Box<Self>)
A set of key value pairs.
i.e. [string]int
Foreign(Box<Self>)
A hint that the type is foreign.
i.e. @path::to::struct
Trait Implementations§
Source§impl<V: IdentValidation> FromStr for Typing<V>
impl<V: IdentValidation> FromStr for Typing<V>
impl<Validation: Eq> Eq for Typing<Validation>
impl<Validation> StructuralPartialEq for Typing<Validation>
Auto Trait Implementations§
impl<Validation> Freeze for Typing<Validation>
impl<Validation> RefUnwindSafe for Typing<Validation>where
Validation: RefUnwindSafe,
impl<Validation> Send for Typing<Validation>where
Validation: Send,
impl<Validation> Sync for Typing<Validation>where
Validation: Sync,
impl<Validation> Unpin for Typing<Validation>where
Validation: Unpin,
impl<Validation> UnwindSafe for Typing<Validation>where
Validation: 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