Trait TryMap

Source
pub trait TryMap: Sized {
    // Required method
    fn try_map<F: FnOnce(f32) -> f32>(&self, op: F) -> Option<Self>;
}
Expand description

A trait for values that can potentially be mapped.

Required Methods§

Source

fn try_map<F: FnOnce(f32) -> f32>(&self, op: F) -> Option<Self>

Returns the result of the operation, if possible.

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§