Skip to main content

GenericsExt

Trait GenericsExt 

Source
pub trait GenericsExt {
    // Required methods
    fn declared_lifetimes(&self) -> LifetimeSet;
    fn declared_type_params(&self) -> IdentSet;
}
Expand description

Extension trait for pulling specific generics data from a generics AST representation.

Required Methods§

Source

fn declared_lifetimes(&self) -> LifetimeSet

Get the set of all lifetimes declared by the syntax element. This does not look for usage of the lifetime; see UsesLifetimes for that.

Source

fn declared_type_params(&self) -> IdentSet

Get the set of all type parameters declared by the syntax element. This does not look for usage of the type parameter; see UsesTypeParams for that.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl GenericsExt for Generics

Implementors§