pub trait ConversionResultExt<T> {
// Required methods
fn context(self, field: impl Into<String>) -> Result<T, ConversionError>;
fn with_context<F, S>(self, field: F) -> Result<T, ConversionError>
where F: FnOnce() -> S,
S: Into<String>;
}Required Methods§
Sourcefn context(self, field: impl Into<String>) -> Result<T, ConversionError>
fn context(self, field: impl Into<String>) -> Result<T, ConversionError>
Adds a field path segment if the result is an error.
Sourcefn with_context<F, S>(self, field: F) -> Result<T, ConversionError>
fn with_context<F, S>(self, field: F) -> Result<T, ConversionError>
Computes and adds a field path segment only if the result is an error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".