Type Alias ResultWithReport

Source
pub type ResultWithReport<Report, Error> = Result<Report, (Report, Error)>;
Expand description

Errors handling. A type alias for a Result that contains an error which is a tuple of a report and an original error.

This is useful when you want to report additional information along with an error. The ResultWithReport type helps in defining such results more concisely.

Aliased Type§

pub enum ResultWithReport<Report, Error> {
    Ok(Report),
    Err((Report, Error)),
}

Variants§

§1.0.0

Ok(Report)

Contains the success value

§1.0.0

Err((Report, Error))

Contains the error value