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 ContextCreationError
s easier.
Required Methods§
sourcefn check_ssh_status<C>(
self,
cx: &TunnelingClientContext<C>
) -> Result<T, ContextCreationError>
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.
sourcefn add_context(self, msg: &'static str) -> Result<T, ContextCreationError>
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.