Struct edn::OrderedFloat [] [src]

pub struct OrderedFloat<T>(pub T)
where
    T: Float
;

A wrapper around Floats providing an implementation of Ord and Hash.

NaN is sorted as greater than all other values and equal to itself, in contradiction with the IEEE standard.

Methods

impl<T> OrderedFloat<T> where
    T: Float
[src]

[src]

Get the value out.

Trait Implementations

impl<T> Default for OrderedFloat<T> where
    T: Default + Float
[src]

[src]

Returns the "default value" for a type. Read more

impl<T> AsRef<T> for OrderedFloat<T> where
    T: Float
[src]

Important traits for &'a mut R
[src]

Performs the conversion.

impl<T> From<T> for OrderedFloat<T> where
    T: Float
[src]

[src]

Performs the conversion.

impl<'de, T> Deserialize<'de> for OrderedFloat<T> where
    T: Float + Deserialize<'de>, 
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl<T> Copy for OrderedFloat<T> where
    T: Copy + Float
[src]

impl Into<f64> for OrderedFloat<f64>
[src]

[src]

Performs the conversion.

impl Into<f32> for OrderedFloat<f32>
[src]

[src]

Performs the conversion.

impl<T> Eq for OrderedFloat<T> where
    T: PartialEq<T> + Float
[src]

impl<T> Display for OrderedFloat<T> where
    T: Display + Float
[src]

[src]

Formats the value using the given formatter. Read more

impl<T> PartialEq<OrderedFloat<T>> for OrderedFloat<T> where
    T: PartialEq<T> + Float
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<T> AsMut<T> for OrderedFloat<T> where
    T: Float
[src]

Important traits for &'a mut R
[src]

Performs the conversion.

impl<T> Hash for OrderedFloat<T> where
    T: Float
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T> PartialOrd<OrderedFloat<T>> for OrderedFloat<T> where
    T: PartialOrd<T> + Float
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T> Deref for OrderedFloat<T> where
    T: Float
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T> DerefMut for OrderedFloat<T> where
    T: Float
[src]

[src]

Mutably dereferences the value.

impl<T> Debug for OrderedFloat<T> where
    T: Debug + Float
[src]

[src]

Formats the value using the given formatter. Read more

impl<T> Clone for OrderedFloat<T> where
    T: Clone + Float
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T> Ord for OrderedFloat<T> where
    T: PartialOrd<T> + Float
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<T> Serialize for OrderedFloat<T> where
    T: Float + Serialize
[src]

[src]

Serialize this value into the given Serde serializer. Read more