Function in_context_of_with

Source
pub fn in_context_of_with<O, E, C, CE, F, M, B>(
    context: F,
    body: B,
) -> Result<O, CE>
where F: FnOnce() -> C, E: WithContext<C, ContextError = CE>, B: FnOnce() -> Result<O, E>,
Expand description

Executes closure adding context to returned error value with .with_context(context) obtaining context by calling given function on error path