pub trait UsesTypeParams {
    fn uses_type_params(
        &self,
        options: &Options,
        type_set: &'a HashSet<Ident, BuildHasherDefault<FnvHasher>>
    ) -> HashSet<&'a Ident, BuildHasherDefault<FnvHasher>>; fn uses_type_params_cloned(
        &self,
        options: &Options,
        type_set: &HashSet<Ident, BuildHasherDefault<FnvHasher>>
    ) -> HashSet<Ident, BuildHasherDefault<FnvHasher>> { ... } }
Expand description

Searcher for finding type params in a syntax tree. This can be used to determine if a given type parameter needs to be bounded in a generated impl.

Required methods

Returns the subset of the queried type parameters that are used by the implementing syntax element.

This method only accounts for direct usage by the element; indirect usage via bounds or where predicates are not detected.

Provided methods

Find all type params using uses_type_params, then clone the found values and return the set.

Implementations on Foreign Types

Check if an Ident exactly matches one of the sought-after type parameters.

Implementors