Skip to main content

LossyF32Conversion

Trait LossyF32Conversion 

Source
pub trait LossyF32Conversion: Copy {
    // Required method
    fn as_f32_lossy(self) -> f32;
}
Expand description

A helper trait to allow integer to f32 conversion (which may be lossy).

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LossyF32Conversion for f32

Source§

impl LossyF32Conversion for i32

Source§

impl LossyF32Conversion for u32

Implementors§