Trait genpdf::error::Context [−][src]
pub trait Context<T> { fn context(self, msg: impl Into<String>) -> Result<T, Error>; fn with_context<F, S>(self, cb: F) -> Result<T, Error>
where
F: Fn() -> S,
S: Into<String>; }
Expand description
Helper trait for creating Error
instances.
This trait is inspired by anyhow::Context
.
Required methods
Maps the error to an Error
instance with the given message.