pub trait DebugInspect<T, E> {
// Required methods
fn debug_inspect_err<F: FnOnce(&E)>(self, f: F) -> Self;
fn debug_inspect<F: FnOnce(&T)>(self, f: F) -> Self;
}Expand description
Inspect Result values with release-mode elision.
Required Methods§
Sourcefn debug_inspect_err<F: FnOnce(&E)>(self, f: F) -> Self
fn debug_inspect_err<F: FnOnce(&E)>(self, f: F) -> Self
Inspects an Err contained value in debug-mode. In release-mode closure F is elided.
Sourcefn debug_inspect<F: FnOnce(&T)>(self, f: F) -> Self
fn debug_inspect<F: FnOnce(&T)>(self, f: F) -> Self
Inspects an Ok contained value in debug-mode. In release-mode closure F is elided.
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.
Implementors§
impl<T, E> DebugInspect<T, E> for Result<T, E>
Available on debug-assertions enabled only.