Struct virtue::parse::SimpleGeneric
source · #[non_exhaustive]pub struct SimpleGeneric {
pub ident: Ident,
pub constraints: Vec<TokenTree>,
pub default_value: Vec<TokenTree>,
}
Expand description
a simple generic parameter, e.g. struct Foo<F> { .. }
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.ident: Ident
The ident of this generic
constraints: Vec<TokenTree>
The constraints of this generic, e.g. F: SomeTrait
default_value: Vec<TokenTree>
The default value of this generic, e.g. F = ()
Implementations§
Trait Implementations§
source§impl Clone for SimpleGeneric
impl Clone for SimpleGeneric
source§fn clone(&self) -> SimpleGeneric
fn clone(&self) -> SimpleGeneric
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SimpleGeneric
impl Debug for SimpleGeneric
source§impl From<SimpleGeneric> for Generic
impl From<SimpleGeneric> for Generic
source§fn from(gen: SimpleGeneric) -> Self
fn from(gen: SimpleGeneric) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SimpleGeneric
impl RefUnwindSafe for SimpleGeneric
impl !Send for SimpleGeneric
impl !Sync for SimpleGeneric
impl Unpin for SimpleGeneric
impl UnwindSafe for SimpleGeneric
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