pub trait ErrorContext<T> {
// Required methods
fn with_context<K, V>(self, key: K, value: V) -> Result<T, JsonPathError>
where K: Into<String>,
V: Into<String>;
fn with_contexts<I, K, V>(self, contexts: I) -> Result<T, JsonPathError>
where I: IntoIterator<Item = (K, V)>,
K: Into<String>,
V: Into<String>;
}
Expand description
Extension trait for adding context to errors
Required Methods§
fn with_context<K, V>(self, key: K, value: V) -> Result<T, JsonPathError>
fn with_contexts<I, K, V>(self, contexts: I) -> Result<T, JsonPathError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.