Total

Type Alias Total 

Source
pub type Total<T> = Constrained<T, IsFloat>;
Expand description

IEEE 754 floating-point representation with non-standard total ordering and hashing.

This Constrained type applies no constraints and no divergence. It can trivially replace primitive floating point types and implements the standard Eq and Ord traits. See the cmp module for more details about these relations.

Aliased Type§

pub struct Total<T> { /* private fields */ }

Implementations§

Source§

impl<T> Total<T>
where T: Primitive,

Source

pub fn from_slice<'a>(slice: &'a [T]) -> &'a [Self]

Converts a slice of primitive IEEE 754 floating-point values into a slice of Totals.

Unlike try_from_slice, this conversion is infallible and trivial and so has O(1) time complexity.

Source

pub fn from_mut_slice<'a>(slice: &'a mut [T]) -> &'a mut [Self]

Converts a mutable slice of primitive floating-point values into a mutable slice of Totals.

Unlike try_from_mut_slice, this conversion is infallible and trivial and so has O(1) time complexity.

Trait Implementations§

Source§

impl<T> EmptyInhabitant for Total<T>
where T: Primitive,

Source§

fn empty() -> Self

Source§

impl<'a, T> From<&'a T> for &'a Total<T>
where T: Primitive,

Source§

fn from(inner: &'a T) -> Self

Converts to this type from the input type.
Source§

impl<'a, T> From<&'a mut T> for &'a mut Total<T>
where T: Primitive,

Source§

fn from(inner: &'a mut T) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Constrained<T, IsExtendedReal<OrPanic>>> for Total<T>
where T: Primitive,

Source§

fn from(other: ExtendedReal<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Constrained<T, IsReal<OrPanic>>> for Total<T>
where T: Primitive,

Source§

fn from(other: Real<T>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<T> for Total<T>
where T: Primitive,

Source§

fn from(inner: T) -> Self

Converts to this type from the input type.