decorum

Trait Infinite

Source
pub trait Infinite: Encoding {
    const INFINITY: Self;
    const NEG_INFINITY: Self;

    // Required methods
    fn is_infinite(self) -> bool;
    fn is_finite(self) -> bool;
}
Expand description

Floating-point representations that expose infinities.

Required Associated Constants§

Source

const INFINITY: Self

Source

const NEG_INFINITY: Self

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.

Implementations on Foreign Types§

Source§

impl Infinite for f32

Source§

const INFINITY: Self = +Inf_f32

Source§

const NEG_INFINITY: Self = -Inf_f32

Source§

fn is_infinite(self) -> bool

Source§

fn is_finite(self) -> bool

Source§

impl Infinite for f64

Source§

const INFINITY: Self = +Inf_f64

Source§

const NEG_INFINITY: Self = -Inf_f64

Source§

fn is_infinite(self) -> bool

Source§

fn is_finite(self) -> bool

Implementors§

Source§

impl<T, P> Infinite for ConstrainedFloat<T, P>
where T: Float + Primitive, P: Constraint<T> + Member<InfiniteClass>,

Source§

const INFINITY: Self = _

Source§

const NEG_INFINITY: Self = _