[−][src]Trait fehler::Context
Provides the context
method for Result
.
Required methods
fn context<C: Display + Send + Sync + 'static>(
self,
context: C
) -> Result<T, Exception>
self,
context: C
) -> Result<T, Exception>
Wrap the error value with additional context.
fn with_context<C, F>(self, f: F) -> Result<T, Exception> where
C: Display + Send + Sync + 'static,
F: FnOnce(&E) -> C,
C: Display + Send + Sync + 'static,
F: FnOnce(&E) -> C,
Wrap the error value with additional context lazily.
Implementations on Foreign Types
impl<T, E: Error + Send + Sync + 'static> Context<T, E> for Result<T, E>
[src]
fn context<C: Display + Send + Sync + 'static>(
self,
context: C
) -> Result<T, Exception>
[src]
self,
context: C
) -> Result<T, Exception>
fn with_context<C, F>(self, f: F) -> Result<T, Exception> where
C: Display + Send + Sync + 'static,
F: FnOnce(&E) -> C,
[src]
C: Display + Send + Sync + 'static,
F: FnOnce(&E) -> C,
impl<T> Context<T, Exception> for Result<T, Exception>
[src]
fn context<C: Display + Send + Sync + 'static>(
self,
context: C
) -> Result<T, Exception>
[src]
self,
context: C
) -> Result<T, Exception>
fn with_context<C, F>(self, f: F) -> Result<T, Exception> where
C: Display + Send + Sync + 'static,
F: FnOnce(&Exception) -> C,
[src]
C: Display + Send + Sync + 'static,
F: FnOnce(&Exception) -> C,