pub trait AndThenRef<T, E> {
// Required method
fn and_then_ref<U, F>(self, op: F) -> Result<U, E>
where F: FnOnce(&T) -> Result<U, E>;
}Expand description
Chains a fallible operation over a shared reference to a success value.
The owned value is borrowed only while the callback runs. An existing error is forwarded without invoking the callback.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".