pub trait ToResult {
// Provided methods
fn ok<Err>(self) -> Result<Self, Err>
where Self: Sized { ... }
fn err<Any>(self) -> Result<Any, Self>
where Self: Sized { ... }
fn some(self) -> Option<Self>
where Self: Sized { ... }
}Expand description
Convenience constructors for Result and Option values.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".