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