Struct syntax::ast::Generics [−][src]
pub struct Generics { pub params: Vec<GenericParam>, pub where_clause: WhereClause, pub span: Span, }
Represents lifetime, type and const parameters attached to a declaration of a function, enum, trait, etc.
Fields
params: Vec<GenericParam>
where_clause: WhereClause
span: Span
Methods
impl Generics
[src]
impl Generics
pub fn is_lt_parameterized(&self) -> bool
[src]
pub fn is_lt_parameterized(&self) -> bool
pub fn is_type_parameterized(&self) -> bool
[src]
pub fn is_type_parameterized(&self) -> bool
pub fn is_parameterized(&self) -> bool
[src]
pub fn is_parameterized(&self) -> bool
pub fn span_for_name(&self, name: &str) -> Option<Span>
[src]
pub fn span_for_name(&self, name: &str) -> Option<Span>
Trait Implementations
impl Clone for Generics
[src]
impl Clone for Generics
fn clone(&self) -> Generics
[src]
fn clone(&self) -> Generics
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Generics
[src]
impl PartialEq for Generics
fn eq(&self, other: &Generics) -> bool
[src]
fn eq(&self, other: &Generics) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Generics) -> bool
[src]
fn ne(&self, other: &Generics) -> bool
This method tests for !=
.
impl Eq for Generics
[src]
impl Eq for Generics
impl Encodable for Generics
[src]
impl Encodable for Generics
impl Decodable for Generics
[src]
impl Decodable for Generics
impl Hash for Generics
[src]
impl Hash for Generics
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Generics
[src]
impl Debug for Generics
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Generics
[src]
impl Default for Generics
impl ToTokens for Generics
[src]
impl ToTokens for Generics