pub trait ErrorWrap<T, E>where
E: Send + Sync + 'static,{
fn wrap<C, F>(self, f: F) -> Result<T, Error>
where
C: Display + Send + Sync + 'static,
F: FnOnce() -> C;
fn wrap_help<C, F>(self, f: F, help: &'static str) -> Result<T, Error>
where
C: Display + Send + Sync + 'static,
F: FnOnce() -> C;
fn wrap_help_owned<C, F>(self, f: F, help: String) -> Result<T, Error>
where
C: Display + Send + Sync + 'static,
F: FnOnce() -> C;
}
Required Methods
Wrap an error value with additional context that is evaluated lazily only once an error does occur.
Lazily evaluated error wrapper, with an additional static help message