pub trait FloatOption<F: Float>:
Clone
+ Debug
+ Send
+ Sync
+ 'static {
// Required method
fn to_option(&self) -> Option<F>;
}Expand description
A trait to abstract over float types (f32, f64) and their Option variants.
It provides a unified way to convert these types into an Option<F>
where F is a type that implements the Float trait.
Required Methods§
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.