pub type Result<T, E = CaptureError> = Result<T, E>;Expand description
The crate’s result type: Result<T, CaptureError>. Mirrors anyhow::Result so a call
site keeps its Result<T> signatures and only swaps the import.
Aliased Type§
pub enum Result<T, E = CaptureError> {
Ok(T),
Err(E),
}Variants§
Trait Implementations§
Source§impl<T, E: StdError + Send + Sync + 'static> Context<T> for Result<T, E>
impl<T, E: StdError + Send + Sync + 'static> Context<T> for Result<T, E>
Source§fn context(self, context: impl Into<String>) -> Result<T, CaptureError>
fn context(self, context: impl Into<String>) -> Result<T, CaptureError>
Wrap the error with a fixed context message.
Source§fn with_context<S: Into<String>>(
self,
f: impl FnOnce() -> S,
) -> Result<T, CaptureError>
fn with_context<S: Into<String>>( self, f: impl FnOnce() -> S, ) -> Result<T, CaptureError>
Wrap the error with a lazily-built context message (only computed on error).