pub trait LendingIterator {
type Item<'a>
where Self: 'a;
Show 56 methods
// Required method
fn next(&mut self) -> Option<Self::Item<'_>>;
// Provided methods
fn size_hint(&self) -> (usize, Option<usize>) { ... }
fn count(self) -> usize
where Self: Sized { ... }
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { ... }
fn nth(&mut self, n: usize) -> Option<Self::Item<'_>> { ... }
fn step_by(self, step: usize) -> StepBy<Self>
where Self: Sized { ... }
fn take(self, n: usize) -> Take<Self>
where Self: Sized { ... }
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized,
P: for<'a> FnMut(&Self::Item<'a>) -> bool { ... }
fn chain<I>(self, other: I) -> Chain<Self, I>
where Self: Sized,
for<'a> I: LendingIterator<Item<'a> = Self::Item<'a>> + 'a { ... }
fn zip<I>(self, other: I) -> Zip<Self, I>
where Self: Sized,
I: LendingIterator { ... }
fn map<F>(self, f: F) -> Map<Self, F>
where Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>> { ... }
fn for_each<F>(self, f: F)
where Self: Sized,
F: FnMut(Self::Item<'_>) { ... }
fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized,
P: for<'a> FnMut(&Self::Item<'a>) -> bool { ... }
fn filter_map<F>(self, f: F) -> FilterMap<Self, F>
where Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait { ... }
fn fold<B, F>(self, init: B, f: F) -> B
where Self: Sized,
F: FnMut(B, Self::Item<'_>) -> B { ... }
fn cloned<T>(self) -> Cloned<Self>
where Self: Sized,
for<'a> Self::Item<'a>: Deref<Target = T>,
T: Clone { ... }
fn copied<T>(self) -> Copied<Self>
where Self: Sized,
for<'a> Self::Item<'a>: Deref<Target = T>,
T: Copy { ... }
fn enumerate(self) -> Enumerate<Self>
where Self: Sized { ... }
fn skip(self, n: usize) -> Skip<Self>
where Self: Sized { ... }
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where Self: Sized,
P: for<'a> FnMut(&Self::Item<'a>) -> bool { ... }
fn inspect<F>(self, f: F) -> Inspect<Self, F>
where Self: Sized,
F: for<'a> FnMut(&Self::Item<'a>) { ... }
fn scan<St, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized { ... }
fn map_while<F>(self, f: F) -> MapWhile<Self, F>
where Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait { ... }
fn fuse(self) -> Fuse<Self>
where Self: Sized { ... }
fn cycle(self) -> Cycle<Self>
where Self: Sized + Clone { ... }
fn by_ref(&mut self) -> &mut Self
where Self: Sized { ... }
fn all<P>(&mut self, predicate: P) -> bool
where P: FnMut(Self::Item<'_>) -> bool { ... }
fn any<P>(&mut self, predicate: P) -> bool
where P: FnMut(Self::Item<'_>) -> bool { ... }
fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized,
P: FnMut(Self::Item<'_>) -> bool { ... }
fn find<P>(&mut self, predicate: P) -> Option<Self::Item<'_>>
where P: FnMut(&Self::Item<'_>) -> bool { ... }
fn find_map<B, F>(&mut self, f: F) -> Option<B>
where F: FnMut(Self::Item<'_>) -> Option<B> { ... }
fn position<P>(&mut self, predicate: P) -> Option<usize>
where P: FnMut(Self::Item<'_>) -> bool { ... }
fn cmp<I>(self, other: I) -> Ordering
where I: for<'a> LendingIterator<Item<'a> = Self::Item<'a>>,
for<'a> Self::Item<'a>: Ord,
Self: Sized { ... }
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized,
I: LendingIterator,
F: FnMut(Self::Item<'_>, I::Item<'_>) -> Ordering { ... }
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: LendingIterator,
for<'a> Self::Item<'a>: PartialOrd<I::Item<'a>>,
Self: Sized { ... }
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized,
I: LendingIterator,
F: FnMut(Self::Item<'_>, I::Item<'_>) -> Option<Ordering> { ... }
fn eq<I>(self, other: I) -> bool
where I: LendingIterator,
for<'a> Self::Item<'a>: PartialEq<I::Item<'a>>,
Self: Sized { ... }
fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized,
I: LendingIterator,
F: FnMut(Self::Item<'_>, I::Item<'_>) -> bool { ... }
fn ne<I>(self, other: I) -> bool
where I: LendingIterator,
for<'a> Self::Item<'a>: PartialEq<I::Item<'a>>,
Self: Sized { ... }
fn lt<I>(self, other: I) -> bool
where I: LendingIterator,
for<'a> Self::Item<'a>: PartialOrd<I::Item<'a>>,
Self: Sized { ... }
fn le<I>(self, other: I) -> bool
where I: LendingIterator,
for<'a> Self::Item<'a>: PartialOrd<I::Item<'a>>,
Self: Sized { ... }
fn gt<I>(self, other: I) -> bool
where I: LendingIterator,
for<'a> Self::Item<'a>: PartialOrd<I::Item<'a>>,
Self: Sized { ... }
fn ge<I>(self, other: I) -> bool
where I: LendingIterator,
for<'a> Self::Item<'a>: PartialOrd<I::Item<'a>>,
Self: Sized { ... }
fn reduce<B, F>(self, f: F) -> Option<B>
where Self: Sized,
F: FnMut(B, Self::Item<'_>) -> B,
B: for<'a> From<Self::Item<'a>> { ... }
fn try_fold<B, F, E>(&mut self, init: B, f: F) -> Result<B, E>
where Self: Sized,
F: FnMut(B, Self::Item<'_>) -> Result<B, E> { ... }
fn try_for_each<F, E>(&mut self, f: F) -> Result<(), E>
where Self: Sized,
F: FnMut(Self::Item<'_>) -> Result<(), E> { ... }
fn try_find<F, R>(&mut self, f: F) -> Result<Option<Self::Item<'_>>, R>
where Self: Sized,
F: FnMut(&Self::Item<'_>) -> Result<bool, R> { ... }
fn try_reduce<B, F, E>(self, f: F) -> Result<Option<B>, E>
where Self: Sized,
F: FnMut(B, Self::Item<'_>) -> Result<B, E>,
B: for<'a> From<Self::Item<'a>> { ... }
fn max<T>(self) -> Option<T>
where Self: Sized,
for<'a> T: for<'a> From<Self::Item<'a>> + PartialOrd<Self::Item<'a>> { ... }
fn min<T>(self) -> Option<T>
where Self: Sized,
for<'a> T: for<'a> From<Self::Item<'a>> + PartialOrd<Self::Item<'a>> { ... }
fn max_by<T, F>(self, compare: F) -> Option<T>
where Self: Sized,
F: for<'a> FnMut(&T, &Self::Item<'a>) -> Ordering,
T: for<'a> From<Self::Item<'a>> { ... }
fn min_by<T, F>(self, compare: F) -> Option<T>
where Self: Sized,
F: for<'a> FnMut(&T, &Self::Item<'a>) -> Ordering,
T: for<'a> From<Self::Item<'a>> { ... }
fn max_by_key<T, B, F>(self, f: F) -> Option<T>
where Self: Sized,
B: Ord,
F: for<'a> FnMut(&Self::Item<'a>) -> B,
T: for<'a> From<Self::Item<'a>> { ... }
fn min_by_key<T, B, F>(self, f: F) -> Option<T>
where Self: Sized,
B: Ord,
F: for<'a> FnMut(&Self::Item<'a>) -> B,
T: for<'a> From<Self::Item<'a>> { ... }
fn sum<S>(self) -> S
where Self: Sized,
for<'a> S: AddAssign<Self::Item<'a>> + Default { ... }
fn product<P>(self) -> P
where Self: Sized,
for<'a> P: MulAssign<Self::Item<'a>> + From<u8> { ... }
}Expand description
Like Iterator, but items may borrow from &mut self.
This means that the compiler will check that you finish using an item
before requesting the next item, as it’s not allowed for two &mut self to exist
at the same time.
Required Associated Types§
Required Methods§
Sourcefn next(&mut self) -> Option<Self::Item<'_>>
fn next(&mut self) -> Option<Self::Item<'_>>
Advances the lending iterator and returns the next value.
See Iterator::next.
Provided Methods§
Sourcefn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator.
See Iterator::size_hint.
Sourcefn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
Returns the number of items in the lending iterator.
See Iterator::count.
Sourcefn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>
Advances the lending iterator by n elements.
See Iterator::advance_by.
Sourcefn nth(&mut self, n: usize) -> Option<Self::Item<'_>>
fn nth(&mut self, n: usize) -> Option<Self::Item<'_>>
Returns the nth element of the lending iterator.
See Iterator::nth.
Sourcefn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
Creates a lending iterator starting at the same point, but stepping by the given amount at each iteration.
See Iterator::step_by.
Sourcefn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Creates a lending iterator that lends the first n elements, or fewer
if the underlying iterator ends sooner.
See Iterator::take.
Sourcefn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
Creates a lending iterator that lends items matching a predicate.
The predicate is called once for every item.
Once it returns false once, None is returned for all subsequent calls to next.
Sourcefn chain<I>(self, other: I) -> Chain<Self, I>
fn chain<I>(self, other: I) -> Chain<Self, I>
Takes two lending iterators and creates a new lending iterator over both in sequence.
See Iterator::chain.
Sourcefn zip<I>(self, other: I) -> Zip<Self, I>where
Self: Sized,
I: LendingIterator,
fn zip<I>(self, other: I) -> Zip<Self, I>where
Self: Sized,
I: LendingIterator,
‘Zips up’ two lending iterators into a single lending iterator of pairs.
Sourcefn map<F>(self, f: F) -> Map<Self, F>
fn map<F>(self, f: F) -> Map<Self, F>
Takes a closure and creates a lending iterator which calls that closure on each element.
As of writing, in stable rust it’s not possible to create a closure
where the lifetime of its output is tied to its input.
If you’re on nightly, you can use the unstable
closure_lifetime_binder feature. If you’re on stable, try using
a function.
In the case that the closure’s return type doesn’t borrow from its input,
the resulting LendingIterator will implement IntoIterator.
See Iterator::map.
Sourcefn for_each<F>(self, f: F)
fn for_each<F>(self, f: F)
Calls a closure on each element of the lending iterator.
See Iterator::for_each.
Sourcefn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Creates a lending iterator which uses a closure to determine if an element should be yielded.
See Iterator::filter.
Sourcefn filter_map<F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait,
fn filter_map<F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait,
Creates a lending iterator that both filters and maps.
See Iterator::filter_map.
Sourcefn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
Folds every element into an accumulator by applying an operation, returning the final result.
See Iterator::fold.
Sourcefn cloned<T>(self) -> Cloned<Self>
fn cloned<T>(self) -> Cloned<Self>
Creates a lending iterator which clones all of its elements.
The resulting lending iterator implements IntoIterator.
See Iterator::cloned.
Sourcefn copied<T>(self) -> Copied<Self>
fn copied<T>(self) -> Copied<Self>
Creates a lending iterator which copies all of its elements.
The resulting lending iterator implements IntoIterator.
See Iterator::copied.
Sourcefn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates a lending iterator which gives the current iteration count as well as the next value.
Sourcefn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
Creates a lending iterator that skips over the first n elements of self.
Sourcefn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
Creates a lending iterator that rejects elements while predicate returns true.
Sourcefn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
Creates a lending iterator that yields the current element unchanged, while calling a provided function with a reference to that element.
See Iterator::inspect.
Sourcefn scan<St, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where
Self: Sized,
fn scan<St, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>where
Self: Sized,
Creates a lending iterator that yields elements transformed by a stateful closure.
See Iterator::scan.
Sourcefn map_while<F>(self, f: F) -> MapWhile<Self, F>where
Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait,
fn map_while<F>(self, f: F) -> MapWhile<Self, F>where
Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait,
Creates a lending iterator that yields elements while the predicate returns Some.
See Iterator::map_while.
Sourcefn fuse(self) -> Fuse<Self>where
Self: Sized,
fn fuse(self) -> Fuse<Self>where
Self: Sized,
Creates a lending iterator that yields None forever after the
underlying iterator yields None once.
See Iterator::fuse.
Sourcefn cycle(self) -> Cycle<Self>
fn cycle(self) -> Cycle<Self>
Creates a lending iterator that repeats elements endlessly by cloning the iterator.
See Iterator::cycle.
Sourcefn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Borrows the lending iterator.
This is useful to allow applying iterator adapters while still retaining ownership of the original iterator.
Unfortunately adapters that take in a closure are currently incompatible with this, due to limitations in the borrow checker.
Sourcefn all<P>(&mut self, predicate: P) -> bool
fn all<P>(&mut self, predicate: P) -> bool
Tests if every element of the iterator matches a predicate.
Sourcefn any<P>(&mut self, predicate: P) -> bool
fn any<P>(&mut self, predicate: P) -> bool
Tests if any element of the iterator matches a predicate.
Sourcefn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
Checks if the elements of this iterator are partitioned according to the given predicate,
such that all those that return true precede all those that return false.
Sourcefn find<P>(&mut self, predicate: P) -> Option<Self::Item<'_>>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item<'_>>
Searches for an element of an iterator that satisfies a predicate.
Sourcefn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
Applies function to the elements of iterator and returns the first non-none result.
Sourcefn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
Searches for an element in an iterator, returning its index.
Sourcefn cmp<I>(self, other: I) -> Orderingwhere
I: for<'a> LendingIterator<Item<'a> = Self::Item<'a>>,
for<'a> Self::Item<'a>: Ord,
Self: Sized,
fn cmp<I>(self, other: I) -> Orderingwhere
I: for<'a> LendingIterator<Item<'a> = Self::Item<'a>>,
for<'a> Self::Item<'a>: Ord,
Self: Sized,
Lexicographically compares the elements of this Iterator with those
of another.
Sourcefn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
Lexicographically compares the elements of this Iterator with those
of another with respect to the specified comparison function.
Sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
Lexicographically compares the PartialOrd elements of
this Iterator with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned.
Sourcefn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
Lexicographically compares the elements of this Iterator with those
of another with respect to the specified comparison function.
Sourcefn eq<I>(self, other: I) -> bool
fn eq<I>(self, other: I) -> bool
Determines if the elements of this Iterator are equal to those of
another.
Sourcefn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
Determines if the elements of this Iterator are equal to those of
another with respect to the specified equality function.
Sourcefn ne<I>(self, other: I) -> bool
fn ne<I>(self, other: I) -> bool
Determines if the elements of this Iterator are not equal to those of
another.
Sourcefn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Determines if the elements of this Iterator are lexicographically
less than those of another.
Sourcefn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Determines if the elements of this Iterator are lexicographically
less or equal to those of another.
Sourcefn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Determines if the elements of this Iterator are lexicographically
greater than those of another.
Sourcefn ge<I>(self, other: I) -> bool
fn ge<I>(self, other: I) -> bool
Determines if the elements of this Iterator are lexicographically
greater or equal to those of another.
Sourcefn reduce<B, F>(self, f: F) -> Option<B>
fn reduce<B, F>(self, f: F) -> Option<B>
Reduces the elements to a single one, by repeatedly applying a reducing operation.
If the iterator is empty, returns None; otherwise, returns the
result of the reduction.
The reducing function takes an accumulator and an element and returns a new accumulator.
For lending iterators, since items borrow from &mut self, the accumulator must be
an owned type that doesn’t borrow from the iterator.
See Iterator::reduce.
Sourcefn try_fold<B, F, E>(&mut self, init: B, f: F) -> Result<B, E>
fn try_fold<B, F, E>(&mut self, init: B, f: F) -> Result<B, E>
An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error.
After an error is returned, the iterator may be in an unspecified state.
§Errors
Returns the first error produced by the closure f.
See Iterator::try_fold.
Sourcefn try_for_each<F, E>(&mut self, f: F) -> Result<(), E>
fn try_for_each<F, E>(&mut self, f: F) -> Result<(), E>
An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error.
§Errors
Returns the first error produced by the closure f.
Sourcefn try_find<F, R>(&mut self, f: F) -> Result<Option<Self::Item<'_>>, R>
fn try_find<F, R>(&mut self, f: F) -> Result<Option<Self::Item<'_>>, R>
Applies function to the elements of iterator and returns the first true result or the first error.
§Errors
Returns the first error produced by the predicate f.
See Iterator::try_find.
Sourcefn try_reduce<B, F, E>(self, f: F) -> Result<Option<B>, E>
fn try_reduce<B, F, E>(self, f: F) -> Result<Option<B>, E>
Reduces the elements to a single one by repeatedly applying a reducing operation. If the closure returns a failure, the failure is propagated back to the caller immediately.
For lending iterators, the accumulator must be an owned type since items borrow from &mut self.
§Errors
Returns the first error produced by the reducing closure f.
See Iterator::try_reduce.
Sourcefn max<T>(self) -> Option<T>
fn max<T>(self) -> Option<T>
Returns the maximum element of an iterator.
For lending iterators, items are compared in their borrowed form and only
converted to the owned type T when they become the new maximum, minimizing
conversions.
See Iterator::max.
Sourcefn min<T>(self) -> Option<T>
fn min<T>(self) -> Option<T>
Returns the minimum element of an iterator.
For lending iterators, items are compared in their borrowed form and only
converted to the owned type T when they become the new minimum, minimizing
conversions.
See Iterator::min.
Sourcefn max_by<T, F>(self, compare: F) -> Option<T>
fn max_by<T, F>(self, compare: F) -> Option<T>
Returns the element that gives the maximum value from the specified function.
For lending iterators, the comparison function operates on borrowed items and owned
values. Items are only converted to T when they become the new maximum.
See Iterator::max_by.
Sourcefn min_by<T, F>(self, compare: F) -> Option<T>
fn min_by<T, F>(self, compare: F) -> Option<T>
Returns the element that gives the minimum value from the specified function.
For lending iterators, the comparison function operates on borrowed items and owned
values. Items are only converted to T when they become the new minimum.
See Iterator::min_by.
Sourcefn max_by_key<T, B, F>(self, f: F) -> Option<T>
fn max_by_key<T, B, F>(self, f: F) -> Option<T>
Returns the element that gives the maximum value with respect to the specified key function.
For lending iterators, the key function operates on borrowed items. Items are
only converted to T when they produce a new maximum key.
See Iterator::max_by_key.
Sourcefn min_by_key<T, B, F>(self, f: F) -> Option<T>
fn min_by_key<T, B, F>(self, f: F) -> Option<T>
Returns the element that gives the minimum value with respect to the specified key function.
For lending iterators, the key function operates on borrowed items. Items are
only converted to T when they produce a new minimum key.
See Iterator::min_by_key.
Sourcefn sum<S>(self) -> S
fn sum<S>(self) -> S
Sums the elements of an iterator.
Takes each element, converts it to the sum type, and adds them together.
An empty iterator returns the zero value of the type.
For lending iterators, items must be convertible to the sum type.
See Iterator::sum.
Sourcefn product<P>(self) -> P
fn product<P>(self) -> P
Iterates over the entire iterator, multiplying all the elements
An empty iterator returns the multiplicative identity (1).
Unlike Iterator::product, this works directly with borrowed items by requiring
the product type to implement MulAssign for the borrowed item type.
Note: Requires From<u8> to create the identity value (1). This works for all
standard numeric types. For types without this conversion, consider using
fold or reduce instead.
See Iterator::product.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.