pub trait OptionUtils<T> {
// Required methods
fn inner_mut<F>(&mut self, f: F)
where F: FnOnce(&mut T);
fn map_into<R>(self) -> Option<R>
where Self: Sized,
T: Into<R>;
fn try_map_into<R, E>(self) -> Result<Option<R>, E>
where Self: Sized,
T: TryInto<R, Error = E>;
}
Expand description
A collection of utilities for working with Rust’s Option type.
Required Methods§
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.