[][src]Enum problem::Problem

pub enum Problem {
    Cause(StringOption<String>),
    Context(StringBox<Problem>),
}

Error type that is not supposed to be handled but reported, panicked on or ignored

Variants

Cause(StringOption<String>)Context(StringBox<Problem>)

Methods

impl Problem[src]

pub fn cause(
    msg: impl ToString
) -> Problem
[src]

Create Problem from any type implementing ToString or Display

pub fn from_error(error: &dyn Error) -> Problem[src]

Create Problem from type implement Error so that Error::cause is followed through

pub fn while_context(
    self,
    msg: impl ToString
) -> Problem
[src]

Add context information to this Problem instance

pub fn backtrace(&self) -> Option<&str>[src]

Get backtrace associated with this Problem instance if available

Trait Implementations

impl<E> From<E> for Problem where
    E: Error
[src]

Every type implementing Error trait can implicitly be converted to Problem via ? operator

impl Debug for Problem[src]

impl Display for Problem[src]

Auto Trait Implementations

impl Send for Problem

impl Sync for Problem

Blanket Implementations

impl<T> ToProblem for T where
    T: ToString
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]