Trait swc_common::pass::util::move_map::MoveMap[][src]

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
, { ... } }

Modifiers vector in-place.

Required methods

fn move_flat_map<F, I>(self, f: F) -> Self where
    F: FnMut(T) -> I,
    I: IntoIterator<Item = T>, 
[src]

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.

Loading content...

Provided methods

fn move_map<F>(self, f: F) -> Self where
    F: FnMut(T) -> T, 
[src]

Map in place.

Loading content...

Implementations on Foreign Types

impl<T> MoveMap<T> for Vec<T, Global>[src]

pub 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, 
[src]

This reduces binary size.

pub 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>, 
[src]

Loading content...

Implementors

Loading content...