[][src]Struct problem::Problem

pub struct Problem { /* fields omitted */ }

Wraps error, context and backtrace information and formats it for display. Data is heap allocated to avoid type parameters or lifetimes.

Methods

impl Problem[src]

pub fn from_error(error: impl Into<Box<dyn Error>>) -> Problem[src]

Create Problem from types implementing Into<Box<dyn Error>> (including String and &str) so that Error::cause chain is followed through in the Display message

pub fn from_error_message(error: &impl Error) -> Problem[src]

Same as Problem::from_error but stores only final message as String and does not take ownership of the error

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

Get backtrace associated with this Problem instance if available

Trait Implementations

impl Debug for Problem[src]

impl Display for Problem[src]

impl<E> From<E> for Problem where
    E: Into<Box<dyn Error>>, 
[src]

Every type implementing Into<Box<dyn Error>> trait (including String and &str types) can be converted to Problem via ? operator

impl From<Problem> for FatalProblem[src]

impl ProblemWhile for Problem[src]

type WithContext = Problem

Auto Trait Implementations

impl !RefUnwindSafe for Problem

impl !Send for Problem

impl !Sync for Problem

impl Unpin for Problem

impl !UnwindSafe for Problem

Blanket Implementations

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

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

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

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

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

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

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

type Error = !

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.