Trait ResultExt

Source
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§

Source

fn unexpected(self) -> Self

Marks the error side of the result as unexpected

Source

fn expected(self) -> Self

Marks the error side of the result as expected

Source

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.

Implementors§

Source§

impl<T> ResultExt for Result<T>