pub trait UsesLifetimes {
    fn uses_lifetimes(
        &self,
        options: &Options,
        lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
    ) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>; fn uses_lifetimes_cloned(
        &self,
        options: &Options,
        lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
    ) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>> { ... } }
Expand description

Searcher for finding lifetimes in a syntax tree. This can be used to determine which lifetimes must be emitted in generated code.

Required methods

Returns the subset of the queried lifetimes 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 used lifetimes, then clone them and return that set.

Implementations on Foreign Types

Implementors