[][src]Trait apply::Also

pub trait Also: Sized {
    fn also<F: FnOnce(&mut Self)>(self, block: F) -> Self { ... }
}

Represents a type that you can apply arbitrary functions to. Useful for when a method doesn't return the receiver but you want to apply several of them to the object.

Provided methods

fn also<F: FnOnce(&mut Self)>(self, block: F) -> Self

Apply a function to this value and return the (possibly) modified value.

Loading content...

Implementors

impl<T: Sized> Also for T[src]

Loading content...