pub struct F64(pub f64);
Expand description
A wrapper for f64
, which implements Eq
, Hash
and Ord
using f64::total_cmp
for a total order comparison
Tuple Fields§
§0: f64
Implementations§
Trait Implementations§
Source§impl Ord for F64
Ordering comparison
impl Ord for F64
Ordering comparison
In order to be able to use F64
as a mapping key, floating values use f64::total_cmp
for a total order comparison.
use ron::value::F64;
assert!(F64::new(f64::NAN) > F64::new(f64::INFINITY));
assert!(F64::new(-f64::NAN) < F64::new(f64::NEG_INFINITY));
assert!(F64::new(f64::NAN) == F64::new(f64::NAN));
Source§impl PartialEq for F64
Partial equality comparison
impl PartialEq for F64
Partial equality comparison
In order to be able to use F64
as a mapping key, floating values use f64::total_cmp
for a total order comparison.
See the Ord
implementation.
Source§impl PartialOrd for F64
Partial ordering comparison
impl PartialOrd for F64
Partial ordering comparison
In order to be able to use F64
as a mapping key, floating values use f64::total_cmp
for a total order comparison.
See the Ord
implementation.
impl Copy for F64
impl Eq for F64
Equality comparison
In order to be able to use F64
as a mapping key, floating values use f64::total_cmp
for a total order comparison.
See the Ord
implementation.
Auto Trait Implementations§
impl Freeze for F64
impl RefUnwindSafe for F64
impl Send for F64
impl Sync for F64
impl Unpin for F64
impl UnwindSafe for F64
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more