Struct syntax::ast::GenericsUnstable [-] [+] [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_parameterized(&self) -> bool

fn is_lt_parameterized(&self) -> bool

fn is_type_parameterized(&self) -> bool

Trait Implementations

impl ToSource for Generics

fn to_source(&self) -> String

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, Error>

impl Encodable for Generics

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

impl Eq for Generics

fn assert_receiver_is_total_eq(&self)

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)