Skip to main content

Rejection

Trait Rejection 

Source
pub trait Rejection:
    Error
    + Send
    + Sync
    + 'static {
    type Code: Copy + Eq + Hash + Debug + Display + Into<&'static str> + Send + Sync + 'static;

    // Required method
    fn code(&self) -> Self::Code;

    // Provided method
    fn level(&self) -> Level { ... }
}
Expand description

A pure, caller-correctable domain outcome. Implemented by hand or via #[derive(errlanes::Rejection)], which emits Display/Error itself (defaulting Display to the code) unless #[rejection(error = manual)] hands that to thiserror or a hand-written impl.

Required Associated Types§

Source

type Code: Copy + Eq + Hash + Debug + Display + Into<&'static str> + Send + Sync + 'static

A stable, typed, wire-safe identity for this outcome.

Required Methods§

Source

fn code(&self) -> Self::Code

Provided Methods§

Source

fn level(&self) -> Level

Operator level for this outcome. Rejections default to Info.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§