async_graphql

Trait ErrorExtensions

Source
pub trait ErrorExtensions: Sized {
    // Required method
    fn extend(&self) -> Error;

    // Provided method
    fn extend_with<C>(self, cb: C) -> Error
       where C: FnOnce(&Self, &mut ErrorExtensionValues) { ... }
}
Expand description

An error which can be extended into a Error.

Required Methods§

Source

fn extend(&self) -> Error

Convert the error to a Error.

Provided Methods§

Source

fn extend_with<C>(self, cb: C) -> Error
where C: FnOnce(&Self, &mut ErrorExtensionValues),

Add extensions to the error, using a callback to make the extensions.

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.

Implementations on Foreign Types§

Source§

impl<E: Display> ErrorExtensions for &E

Source§

fn extend(&self) -> Error

Implementors§