Struct syntex_syntax::ast::Generics [] [src]

pub struct Generics {
    pub lifetimes: Vec<LifetimeDef>,
    pub ty_params: OwnedSlice<TyParam>,
    pub where_clause: WhereClause,
}

Represents lifetimes and type parameters attached to a declaration of a function, enum, trait, etc.

Fields

lifetimes
ty_params
where_clause

Methods

impl Generics

fn is_lt_parameterized(&self) -> bool

fn is_type_parameterized(&self) -> bool

fn is_parameterized(&self) -> bool

Trait Implementations

impl ToTokens for Generics

fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>

Derived Implementations

impl Debug for Generics

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Hash for Generics

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Decodable for Generics

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Generics, __D::Error>

impl Encodable for Generics

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Eq for Generics

impl PartialEq for Generics

fn eq(&self, __arg_0: &Generics) -> bool

fn ne(&self, __arg_0: &Generics) -> bool

impl Clone for Generics

fn clone(&self) -> Generics

fn clone_from(&mut self, source: &Self)