Struct cglue_gen::generics::ParsedGenerics [−][src]
pub struct ParsedGenerics {
pub life_declare: Punctuated<LifetimeDef, Comma>,
pub life_use: Punctuated<Lifetime, Comma>,
pub gen_declare: Punctuated<TypeParam, Comma>,
pub gen_use: Punctuated<Type, Comma>,
pub gen_where_bounds: Punctuated<WherePredicate, Comma>,
pub gen_remaps: HashMap<Ident, Type>,
}
Fields
life_declare: Punctuated<LifetimeDef, Comma>
Lifetime declarations on the left side of the type/trait.
This may include any bounds it contains, for instance: 'a: 'b,
.
life_use: Punctuated<Lifetime, Comma>
Declarations “using” the lifetimes i.e. has bounds stripped.
For instance: 'a: 'b,
becomes just 'a,
.
gen_declare: Punctuated<TypeParam, Comma>
Type declarations on the left side of the type/trait.
This may include any trait bounds it contains, for instance: T: Clone,
.
gen_use: Punctuated<Type, Comma>
Declarations that “use” the traits i.e. has bounds stripped.
For instance: T: Clone,
becomes just T,
.
gen_where_bounds: Punctuated<WherePredicate, Comma>
All where predicates, without the where
keyword.
gen_remaps: HashMap<Ident, Type>
Remap generic T to a particular type using T = type syntax.
Then, when generics get cross referenced, all concrete T declarations get removed, and T uses get replaced with concrete types.
Implementations
This function cross references input lifetimes and returns a new Self that only contains generic type information about those types.
Generate phantom data definitions for all lifetimes and types used.
Generate phantom data initializations for all lifetimes and types used.
Trait Implementations
Performs the conversion.
Performs the conversion.
Creates a value from an iterator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ParsedGenerics
impl !Send for ParsedGenerics
impl !Sync for ParsedGenerics
impl Unpin for ParsedGenerics
impl UnwindSafe for ParsedGenerics
Blanket Implementations
Mutably borrows from an owned value. Read more