Struct syntax::ast::GenericsExperimental [-]  [+] [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 Show for Generics

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

impl<__S: Writer> Hash<__S> for Generics

fn hash(&self, __arg_0: &mut __S)

impl<__D: Decoder<__E>, __E> Decodable<__D, __E> for Generics

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

impl<__S: Encoder<__E>, __E> Encodable<__S, __E> for Generics

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

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)