trait IteratorRefSpec: Iterator {
// Required methods
fn spec_fold<B, F>(self, init: B, f: F) -> B
where F: FnMut(B, Self::Item) -> B;
fn spec_try_fold<B, F, R>(&mut self, init: B, f: F) -> R
where F: FnMut(B, Self::Item) -> R,
R: Try<Output = B>;
}
Expand description
Helper trait to specialize fold
and try_fold
for &mut I where I: Sized
Required Methods§
fn spec_fold<B, F>(self, init: B, f: F) -> B
fn spec_try_fold<B, F, R>(&mut self, init: B, f: F) -> R
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.