Skip to main content

ErrorWith

Trait ErrorWith 

Source
pub trait ErrorWith {
    // Required methods
    fn want<S: Into<String>>(self, desc: S) -> Self;
    fn position<S: Into<String>>(self, desc: S) -> Self;
    fn with_context<C: Into<OperationContext>>(self, ctx: C) -> Self;

    // Provided methods
    fn attach_context<C: Into<OperationContext>>(self, ctx: C) -> Self
       where Self: Sized { ... }
    fn with<C: Into<OperationContext>>(self, ctx: C) -> Self
       where Self: Sized { ... }
    fn doing<S: Into<String>>(self, desc: S) -> Self
       where Self: Sized { ... }
    fn at<C: Into<OperationContext>>(self, ctx: C) -> Self
       where Self: Sized { ... }
}

Required Methods§

Source

fn want<S: Into<String>>(self, desc: S) -> Self

👎Deprecated since 0.7.0:

use doing(…) for action contexts; use at(…) for locator/resource contexts

Source

fn position<S: Into<String>>(self, desc: S) -> Self

Source

fn with_context<C: Into<OperationContext>>(self, ctx: C) -> Self

Provided Methods§

Source

fn attach_context<C: Into<OperationContext>>(self, ctx: C) -> Self
where Self: Sized,

👎Deprecated since 0.7.0:

use with_context(…) for full context frames; use doing(…) / at(…) for semantic context helpers

Source

fn with<C: Into<OperationContext>>(self, ctx: C) -> Self
where Self: Sized,

👎Deprecated since 0.7.0:

use with_context(…) for full context frames; use at(…) / doing(…) for semantic context helpers

Source

fn doing<S: Into<String>>(self, desc: S) -> Self
where Self: Sized,

Source

fn at<C: Into<OperationContext>>(self, ctx: C) -> Self
where Self: Sized,

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<T, E: ErrorWith> ErrorWith for Result<T, E>

Source§

fn want<S: Into<String>>(self, desc: S) -> Self

👎Deprecated since 0.7.0:

use doing(…) for action contexts; use at(…) for locator/resource contexts

Source§

fn position<S: Into<String>>(self, desc: S) -> Self

Source§

fn with_context<C: Into<OperationContext>>(self, ctx: C) -> Self

Implementors§