pub trait MoveMap<T> {
fn move_flat_map<F, I>(self, f: F) -> Self
where
F: FnMut(T) -> I,
I: IntoIterator<Item = T>;
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
Implementations on Foreign Types
sourceimpl<T> MoveMap<T> for Vec<T, Global>
impl<T> MoveMap<T> for Vec<T, Global>
sourcefn move_map<F>(self, f: F) -> Vec<T, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
where
F: FnMut(T) -> T,
fn move_map<F>(self, f: F) -> Vec<T, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
where
F: FnMut(T) -> T,
A: Allocator,
This reduces binary size.
fn move_flat_map<F, I>(self, f: F) -> Vec<T, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
where
F: FnMut(T) -> I,
I: IntoIterator<Item = T>,
A: Allocator,