pub enum Type {
Exactly(PrimitiveType),
EitherOf(Vec<PrimitiveType>),
}Expand description
Variants§
Exactly(PrimitiveType)
The type is exactly this named type.
EitherOf(Vec<PrimitiveType>)
The type is either of these named types..
Implementations§
Trait Implementations§
Source§impl From<PrimitiveType> for Type
impl From<PrimitiveType> for Type
Source§fn from(value: PrimitiveType) -> Self
fn from(value: PrimitiveType) -> Self
Converts to this type from the input type.
Source§impl From<Type> for FunctionType
impl From<Type> for FunctionType
Source§impl From<Vec<PrimitiveType>> for Type
impl From<Vec<PrimitiveType>> for Type
Source§fn from(value: Vec<PrimitiveType>) -> Self
fn from(value: Vec<PrimitiveType>) -> Self
Converts to this type from the input type.
Source§impl<'a, P> FromIterator<P> for Typewhere
P: Into<PrimitiveType>,
impl<'a, P> FromIterator<P> for Typewhere
P: Into<PrimitiveType>,
Source§fn from_iter<T: IntoIterator<Item = P>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = P>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for Type
impl IntoIterator for Type
Source§impl Parser for Type
Available on crate feature parser only.
impl Parser for Type
Available on crate feature
parser only.Source§fn parse<'a, S: Into<Span<'a>>>(input: S) -> ParseResult<'a, Self::Item>
fn parse<'a, S: Into<Span<'a>>>(input: S) -> ParseResult<'a, Self::Item>
See parse_type.
type Item = Type
Source§fn parse_span(input: Span<'_>) -> ParseResult<'_, Self::Item>
fn parse_span(input: Span<'_>) -> ParseResult<'_, Self::Item>
Parses the
input into the specified Item type.Source§fn from_str(input: &str) -> Result<Self::Item, Err<ParseError<'_>>>
fn from_str(input: &str) -> Result<Self::Item, Err<ParseError<'_>>>
Uses the
Parser::parse method to parse the input and, if successful,
discards the unparsed remaining input.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