pub trait Float:
Sealed
+ Copy
+ PartialOrd
+ Debug {
// Required methods
fn abs_diff(self, other: Self) -> Self;
fn float_is_nan(self) -> bool;
fn float_is_finite(self) -> bool;
}Expand description
A floating-point type the numeric matchers operate on.
Sealed: implemented for f32 and f64 only, so adding a method here is
never a breaking change for downstream code.
Required Methods§
Sourcefn float_is_nan(self) -> bool
fn float_is_nan(self) -> bool
Whether self is NaN.
Sourcefn float_is_finite(self) -> bool
fn float_is_finite(self) -> bool
Whether self is neither infinite nor NaN.
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.