Float

Trait Float 

Source
pub trait Float:
    Sized
    + ToString
    + Send {
    const MIN: Option<Self>;
    const MAX: Option<Self>;
}
Expand description

A trait for types that can be represented as a float.

This trait is implemented for f32 and f64.

Required Associated Constants§

Source

const MIN: Option<Self>

The minimum value of the type.

§Examples
use cot::form::fields::Float;

assert_eq!(<f32 as Float>::MIN, Some(f32::MIN));
Source

const MAX: Option<Self>

The maximum value of the type.

§Examples
use cot::form::fields::Float;

assert_eq!(<f32 as Float>::MAX, Some(f32::MAX));

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.

Implementations on Foreign Types§

Source§

impl Float for f32

Source§

const MIN: Option<Self>

Source§

const MAX: Option<Self>

Source§

impl Float for f64

Source§

const MIN: Option<Self>

Source§

const MAX: Option<Self>

Implementors§