pub trait Try {
type Output;
type WithOutput<T>: Try;
// Required method
fn from_output(output: Self::Output) -> Self;
}
Expand description
Equivalent of core::ops::Try
that doesn’t require nightly and allows changing the output
type using a GAT.
Automatically implemented for Optioncore::ops::Try
, but doesn’t have an explicit dependency as it’s unstable).
Required Associated Types§
type Output
type WithOutput<T>: Try
Required Methods§
fn from_output(output: Self::Output) -> Self
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.