pub trait ResultExt {
// Required methods
fn unexpected(self) -> Self;
fn expected(self) -> Self;
fn with_str_property(self, key: &'static str, value: &'static str) -> Self;
}
Expand description
Utility trait to extend a Result
Required Methods§
Sourcefn unexpected(self) -> Self
fn unexpected(self) -> Self
Marks the error side of the result as unexpected
Sourcefn with_str_property(self, key: &'static str, value: &'static str) -> Self
fn with_str_property(self, key: &'static str, value: &'static str) -> Self
Appends an string property to the error side of the result
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.