Struct ordered_float::OrderedFloat[][src]

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

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: Float> OrderedFloat<T>
[src]

Get the value out.

Trait Implementations

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

Formats the value using the given formatter. Read more

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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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

Performs the conversion.

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

Performs the conversion.

impl<T: Float + PartialOrd> PartialOrd for OrderedFloat<T>
[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: Float + PartialOrd> Ord for OrderedFloat<T>
[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: Float + PartialEq> PartialEq for OrderedFloat<T>
[src]

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

This method tests for !=.

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

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

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

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

Formats the value using the given formatter. Read more

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

The resulting type after dereferencing.

Dereferences the value.

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

Mutably dereferences the value.

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

Auto Trait Implementations

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

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