Trait bigerror::Reportable

source ·
pub trait Reportable
where Self: Sized + Context,
{
Show 13 methods // Required methods fn report<C: Context>(ctx: C) -> Report<Self>; fn attach<A>(value: A) -> Report<Self> where A: Display; fn attach_debug<A>(value: A) -> Report<Self> where A: Debug; fn with_kv<K, V>(key: K, value: V) -> Report<Self> where K: Display, V: Display; fn with_kv_debug<K, V>(key: K, value: V) -> Report<Self> where K: Debug, V: Debug; fn report_with_kv<K, V, C: Context>( ctx: C, key: K, value: V ) -> Report<Self> where K: Display, V: Display; fn report_inner<C: Context>(err: impl ToReport<C>) -> Report<Self>; fn with_field_status<S>(name: &'static str, status: S) -> Report<Self> where S: Display + Debug + Send + Sync + 'static; fn value() -> Self; // Provided methods fn expected_actual<A: Display>(expected: A, actual: A) -> Report<Self> { ... } fn with_variant<A: Display>(value: A) -> Report<Self> { ... } fn with_variant_debug<A: Debug>(value: A) -> Report<Self> { ... } fn with_type<A>() -> Report<Self> { ... }
}
Expand description

Reportable behaves as an error_stack::ContextExt ideally used for zero sized errors or ones that hold a 'static ref/value

Required Methods§

source

fn report<C: Context>(ctx: C) -> Report<Self>

source

fn attach<A>(value: A) -> Report<Self>
where A: Display,

source

fn attach_debug<A>(value: A) -> Report<Self>
where A: Debug,

source

fn with_kv<K, V>(key: K, value: V) -> Report<Self>
where K: Display, V: Display,

source

fn with_kv_debug<K, V>(key: K, value: V) -> Report<Self>
where K: Debug, V: Debug,

source

fn report_with_kv<K, V, C: Context>(ctx: C, key: K, value: V) -> Report<Self>
where K: Display, V: Display,

source

fn report_inner<C: Context>(err: impl ToReport<C>) -> Report<Self>

source

fn with_field_status<S>(name: &'static str, status: S) -> Report<Self>
where S: Display + Debug + Send + Sync + 'static,

source

fn value() -> Self

Provided Methods§

source

fn expected_actual<A: Display>(expected: A, actual: A) -> Report<Self>

source

fn with_variant<A: Display>(value: A) -> Report<Self>

source

fn with_variant_debug<A: Debug>(value: A) -> Report<Self>

source

fn with_type<A>() -> Report<Self>

Object Safety§

This trait is not object safe.

Implementors§