pub trait MoveMap<T>: Sized {
// Required method
fn move_flat_map<F, I>(self, f: F) -> Self
where F: FnMut(T) -> I,
I: IntoIterator<Item = T>;
// Provided method
fn move_map<F>(self, f: F) -> Self
where F: FnMut(T) -> T { ... }
}
Expand description
Modifiers vector in-place.
Required Methods§
Sourcefn move_flat_map<F, I>(self, f: F) -> Selfwhere
F: FnMut(T) -> I,
I: IntoIterator<Item = T>,
fn move_flat_map<F, I>(self, f: F) -> Selfwhere
F: FnMut(T) -> I,
I: IntoIterator<Item = T>,
This will be very slow if you try to extend vector using this method.
This method exists to drop useless nodes. You can return Option to do such shortening.
Provided Methods§
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.