Trait bigerror::Reportable
source · pub trait Reportable{
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§
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>
fn with_kv_debug<K, V>(key: K, value: V) -> Report<Self>
fn report_with_kv<K, V, C: Context>(ctx: C, key: K, value: V) -> Report<Self>
fn report_inner<C: Context>(err: impl ToReport<C>) -> Report<Self>
fn with_field_status<S>(name: &'static str, status: S) -> Report<Self>
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>
Object Safety§
This trait is not object safe.