[][src]Function error_context::wrap_in_context_of_with

pub fn wrap_in_context_of_with<O, E, C, F, B>(
    context: F,
    body: B
) -> Result<O, ErrorContext<E, C>> where
    F: FnOnce() -> C,
    E: WrapContext<C, ContextError = ErrorContext<E, C>>,
    B: FnOnce() -> Result<O, E>, 

Executes closure adding context to returned error value by wrapping it in ErrorContext with .wrap_context(context) obtaining context by calling given function on error path