Enum virtue::parse::Generic [−][src]
#[non_exhaustive]
pub enum Generic {
Lifetime(Lifetime),
Generic(SimpleGeneric),
Const(ConstGeneric),
}Expand description
A single generic argument on a type
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.
Lifetime(Lifetime)
Tuple Fields
0: LifetimeA lifetime generic
struct Foo<'a> { // will be Generic::Lifetime("a")
}Generic(SimpleGeneric)
Tuple Fields
A simple generic
struct Foo<F> { // will be Generic::Generic("F")
}Const(ConstGeneric)
A const generic
struct Foo<const N: usize> { // will be Generic::Const("N")
}Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Generic
impl UnwindSafe for Generic
Blanket Implementations
Mutably borrows from an owned value. Read more