pub trait With: Sized {
// Provided methods
fn with<F>(self, f: F) -> Self
where F: FnOnce(&mut Self) { ... }
fn try_with<F, E>(self, f: F) -> Result<Self, E>
where F: FnOnce(&mut Self) -> Result<(), E> { ... }
}
Provided Methods§
fn with<F>(self, f: F) -> Selfwhere
F: FnOnce(&mut Self),
fn try_with<F, E>(self, f: F) -> Result<Self, E>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.