pub trait MapRef<T, E> {
// Required method
fn map_ref<U, F>(self, op: F) -> Result<U, E>
where F: FnOnce(&T) -> U;
}Expand description
Maps a successful result through a shared reference to its value.
The operation borrows the owned success value for the duration of the callback. An existing error is forwarded unchanged.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".