Function wrap_in_context_of

Source
pub fn wrap_in_context_of<O, E, C, B>(
    context: C,
    body: B,
) -> Result<O, ErrorContext<E, C>>
where E: WrapContext<C, ContextError = ErrorContext<E, C>>, B: FnOnce() -> Result<O, E>,
Expand description

Executes closure adding context to returned error value by wrapping it in ErrorContext with .wrap_context(context)