pub trait ToFloat {
// Required methods
fn to_f32(&self) -> Result<f32, ()>;
fn to_f64(&self) -> Result<f64, ()>;
}Expand description
Convert a number type into a float.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".