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

Formats the value using the given formatter.

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> Ord for OrderedFloat<T>
[src]

This method returns an Ordering between self and other. 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 state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

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

Formats the value using the given formatter.

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

The method called to dereference a value

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

The method called to mutably dereference a value

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