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]

Get the value out.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Serialize this value into the given Serde serializer. Read more

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

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

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

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

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

Formats the value using the given formatter. Read more

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

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

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

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

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

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

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

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

Important traits for &'a mut R

Performs the conversion.

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

Performs the conversion.

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

Mutably dereferences the value.

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

Performs the conversion.

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

Performs the conversion.

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

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

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

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

This method tests for !=.

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

Deserialize this value from the given Serde deserializer. Read more

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

Formats the value using the given formatter. Read more

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

The resulting type after dereferencing.

Dereferences the value.

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

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

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

Important traits for &'a mut R

Performs the conversion.

Auto Trait Implementations

impl<T> Send for OrderedFloat<T> where
    T: Send

impl<T> Sync for OrderedFloat<T> where
    T: Sync