Skip to main content

OxiErrorExt

Trait OxiErrorExt 

Source
pub trait OxiErrorExt: Sized {
    // Required method
    fn with_oxi_context(self, frame: ErrorFrame) -> OxiError;
}
Expand description

Extension trait that attaches an ErrorFrame as additional context to any error type that implements std::error::Error.

This avoids a dependency on anyhow by embedding the frame’s Display representation into a new crate::error::OxiError::InvalidData wrapper.

Required Methods§

Source

fn with_oxi_context(self, frame: ErrorFrame) -> OxiError

Wraps self by prepending the frame’s display string as context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<E: Error> OxiErrorExt for E