pub trait ContextCreationErrorExt<T> {
    // Required methods
    fn check_ssh_status<C>(
        self,
        cx: &TunnelingClientContext<C>
    ) -> Result<T, ContextCreationError>;
    fn add_context(self, msg: &'static str) -> Result<T, ContextCreationError>;
}
Expand description

An extension trait for Result<T, E> that makes producing ContextCreationErrors easier.

Required Methods§

source

fn check_ssh_status<C>( self, cx: &TunnelingClientContext<C> ) -> Result<T, ContextCreationError>

Override the error case with an ssh error from cx, if there is one.

source

fn add_context(self, msg: &'static str) -> Result<T, ContextCreationError>

Add context to the errors within the variants of ContextCreationError, without altering the Ssh variant.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, E> ContextCreationErrorExt<T> for Result<T, E>

Implementors§