pub(crate) trait With<T> {
// Required methods
fn with<O, F: FnOnce(T) -> O>(self, f: F) -> O;
fn try_with_or<E, F: FnOnce() -> Result<T, E>>(
f: F,
err: E,
) -> Result<Self, E>
where Self: Sized;
}Required Methods§
fn with<O, F: FnOnce(T) -> O>(self, f: F) -> O
fn try_with_or<E, F: FnOnce() -> Result<T, E>>(f: F, err: E) -> Result<Self, E>where
Self: Sized,
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.