Trait cursive::With
[−]
[src]
pub trait With: Sized { fn with<F: FnOnce(&mut Self)>(self, f: F) -> Self { ... } fn try_with<E, F>(self, f: F) -> Result<Self, E>
where
F: FnOnce(&mut Self) -> Result<(), E>, { ... } }
Generic trait to enable chainable API
Provided Methods
fn with<F: FnOnce(&mut Self)>(self, f: F) -> Self
Calls the given closure on self
.
fn try_with<E, F>(self, f: F) -> Result<Self, E> where
F: FnOnce(&mut Self) -> Result<(), E>,
F: FnOnce(&mut Self) -> Result<(), E>,
Calls the given closure on self
.
Implementors
impl<T: Sized> With for T