Enum syn::GenericArgument [−][src]
pub enum GenericArgument {
Lifetime(Lifetime),
Type(Type),
Binding(Binding),
Constraint(Constraint),
Const(Expr),
}Expand description
An individual generic argument, like 'a, T, or Item = T.
This type is available only if Syn is built with the "derive" or "full"
feature.
Variants
Lifetime(Lifetime)A lifetime argument.
Type(Type)A type argument.
Binding(Binding)A binding (equality constraint) on an associated type: the Item = u8 in Iterator<Item = u8>.
Constraint(Constraint)An associated type bound: Iterator<Item: Display>.
Const(Expr)A const expression. Must be inside of a block.
NOTE: Identity expressions are represented as Type arguments, as they are indistinguishable syntactically.
Trait Implementations
impl Clone for GenericArgument[src]
impl Clone for GenericArgument[src]impl Debug for GenericArgument[src]
impl Debug for GenericArgument[src]impl Hash for GenericArgument[src]
impl Hash for GenericArgument[src]impl Parse for GenericArgument[src]
impl Parse for GenericArgument[src]fn parse(input: ParseStream<'_>) -> Result<Self>[src]
impl PartialEq<GenericArgument> for GenericArgument[src]
impl PartialEq<GenericArgument> for GenericArgument[src]impl ToTokens for GenericArgument[src]
impl ToTokens for GenericArgument[src]fn to_tokens(&self, tokens: &mut TokenStream)[src]
fn to_tokens(&self, tokens: &mut TokenStream)[src]Write self to the given TokenStream. Read more
fn to_token_stream(&self) -> TokenStream[src]
fn to_token_stream(&self) -> TokenStream[src]Convert self directly into a TokenStream object. Read more
fn into_token_stream(self) -> TokenStream[src]
fn into_token_stream(self) -> TokenStream[src]Convert self directly into a TokenStream object. Read more
impl Eq for GenericArgument[src]
Auto Trait Implementations
impl RefUnwindSafe for GenericArgument
impl !Send for GenericArgument
impl !Sync for GenericArgument
impl Unpin for GenericArgument
impl UnwindSafe for GenericArgument
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more