Trait darling::usage::GenericsExt

source ·
pub trait GenericsExt {
    // Required methods
    fn declared_lifetimes(
        &self,
    ) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>;
    fn declared_type_params(
        &self,
    ) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>;
}
Expand description

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

Required Methods§

source

fn declared_lifetimes(&self) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>

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) -> HashSet<Ident, BuildHasherDefault<FnvHasher>>

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.

Implementations on Foreign Types§

source§

impl GenericsExt for Generics

Implementors§