Trait cursive_core::With
source ·
[−]pub trait With: Sized {
fn wrap_with<U, F: FnOnce(Self) -> U>(self, f: F) -> U { ... }
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>,
{ ... }
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
.