pub trait ContextSource {
// Required method
fn apply(&self, err: GeopError) -> GeopError;
}Expand description
Something that can turn one GeopError into another, more-annotated one
— either a plain message (wrapped via GeopError::with_context) or a
callback that builds the wrapped error itself (e.g. to embed live state
captured at the call site). Lets WithContext::with_context accept
either .with_context("a message") or .with_context(&|e| ...).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".