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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Creates a value from an iterator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.