Skip to main content

ResultReportExt

Trait ResultReportExt 

Source
pub trait ResultReportExt<T> {
    // Required method
    fn report_err(self, context: HashMap<String, Value>) -> Self;
}
Expand description

Extension trait for Result, so a fallible call can report its own error and still propagate it in one step:

use forge_ops_tracker::ResultReportExt;
charge_card().report_err(HashMap::new())?;

Required Methods§

Source

fn report_err(self, context: HashMap<String, Value>) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E: Error> ResultReportExt<T> for Result<T, E>

Source§

fn report_err(self, context: HashMap<String, Value>) -> Self

Implementors§