pub trait IntoResult {
type Ok;
// Required method
fn into_result(self) -> Result<Self::Ok>;
}Expand description
A closure’s return value: a tree T, or a Result<T>. So transform closures may return
an array directly (|x: &Array| x.multiply(x).sum(..)) or a Result (with ? inside).
The associated type makes inference unambiguous: a closure returning Result<Array> has
Ok = Array, never Ok = Result<Array> (Result is not a tree).
Required Associated Types§
Required Methods§
Sourcefn into_result(self) -> Result<Self::Ok>
fn into_result(self) -> Result<Self::Ok>
The value, or the closure’s error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".