pub enum Type {
Simple(String),
Either(Vec<String>),
}
Expand description
A type is either a simple type or one of the list of specified types.
Variants§
Simple(String)
The type is a simple type.
Either(Vec<String>)
The type must be one of the specified types.
Implementations§
Source§impl Type
impl Type
Sourcepub fn parse_type(
input: TokenStream<'_>,
) -> IResult<TokenStream<'_>, Type, ParserError>
pub fn parse_type( input: TokenStream<'_>, ) -> IResult<TokenStream<'_>, Type, ParserError>
Parse a type from a token stream.
Sourcepub fn parse_types(
input: TokenStream<'_>,
) -> IResult<TokenStream<'_>, Vec<TypeDef>, ParserError>
pub fn parse_types( input: TokenStream<'_>, ) -> IResult<TokenStream<'_>, Vec<TypeDef>, ParserError>
Parse a list of types from a token stream.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Type
impl<'de> Deserialize<'de> for Type
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 Ord for Type
impl Ord for Type
Source§impl PartialOrd for Type
impl PartialOrd for Type
impl Eq for Type
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 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