Trait darling::usage::CollectLifetimes
source · pub trait CollectLifetimes {
// Required methods
fn collect_lifetimes<'a>(
self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>,
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>;
fn collect_lifetimes_cloned(
self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>,
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>;
}
Expand description
Searcher for finding lifetimes in an iterator.
This trait extends iterators, providing a way to turn a filtered list of fields or variants into a set of lifetimes.
Required Methods§
sourcefn collect_lifetimes<'a>(
self,
options: &Options,
lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>,
) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
fn collect_lifetimes<'a>( self, options: &Options, lifetimes: &'a HashSet<Lifetime, BuildHasherDefault<FnvHasher>>, ) -> HashSet<&'a Lifetime, BuildHasherDefault<FnvHasher>>
Consume an iterator, accumulating all lifetimes in the elements which occur in lifetimes
.
sourcefn collect_lifetimes_cloned(
self,
options: &Options,
lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>,
) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
fn collect_lifetimes_cloned( self, options: &Options, lifetimes: &HashSet<Lifetime, BuildHasherDefault<FnvHasher>>, ) -> HashSet<Lifetime, BuildHasherDefault<FnvHasher>>
Consume an iterator using collect_lifetimes
, then clone all found lifetimes and return that set.