Trait cursive::traits::With [−][src]
pub trait With {
fn wrap_with<U, F>(self, f: F) -> U
where
F: FnOnce(Self) -> U,
{ ... }
fn with<F>(self, f: F) -> Self
where
F: FnOnce(&mut Self),
{ ... }
fn try_with<E, F>(self, f: F) -> Result<Self, E>
where
F: FnOnce(&mut Self) -> Result<(), E>,
{ ... }
fn with_if<F>(self, condition: bool, f: F) -> Self
where
F: FnOnce(&mut Self),
{ ... }
}
Expand description
Generic trait to enable chainable API
Provided methods
Calls the given closure and return the result.
Used to chainify wrapper constructors.
Calls the given closure on self
.