graphql_starter::error

Trait ResultExt

Source
pub trait ResultExt {
    // Required method
    fn with_property(self, key: &str, value: Value) -> Self;

    // Provided method
    fn with_str_property(self, key: &str, value: impl Into<String>) -> Self
       where Self: Sized { ... }
}
Expand description

Utility trait to extend a Result

Required Methods§

Source

fn with_property(self, key: &str, value: Value) -> Self

Appends a property to the error side of the result

Provided Methods§

Source

fn with_str_property(self, key: &str, value: impl Into<String>) -> Self
where Self: Sized,

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>