pub struct F32Distance(pub f32);Expand description
A total-ordered f32 distance wrapper. NaN is treated as greater than all normal values, and NaN == NaN for consistency in ordered collections.
Tuple Fields§
§0: f32Implementations§
Trait Implementations§
Source§impl Add for F32Distance
impl Add for F32Distance
Source§type Output = F32Distance
type Output = F32Distance
The resulting type after applying the
+ operator.Source§fn add(self, other: F32Distance) -> F32Distance
fn add(self, other: F32Distance) -> F32Distance
Performs the
+ operation. Read moreSource§impl Clone for F32Distance
impl Clone for F32Distance
Source§fn clone(&self) -> F32Distance
fn clone(&self) -> F32Distance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for F32Distance
impl Debug for F32Distance
Source§impl Distance for F32Distance
impl Distance for F32Distance
Source§impl Div for F32Distance
impl Div for F32Distance
Source§type Output = F32Distance
type Output = F32Distance
The resulting type after applying the
/ operator.Source§fn div(self, other: F32Distance) -> F32Distance
fn div(self, other: F32Distance) -> F32Distance
Performs the
/ operation. Read moreSource§impl From<F32Distance> for DistanceProto
impl From<F32Distance> for DistanceProto
Source§fn from(dist: F32Distance) -> Self
fn from(dist: F32Distance) -> Self
Converts to this type from the input type.
Source§impl From<F32Distance> for f32
impl From<F32Distance> for f32
Source§fn from(distance: F32Distance) -> f32
fn from(distance: F32Distance) -> f32
Converts to this type from the input type.
Source§impl From<f32> for F32Distance
impl From<f32> for F32Distance
Source§impl Hash for F32Distance
impl Hash for F32Distance
Source§impl Mul for F32Distance
impl Mul for F32Distance
Source§type Output = F32Distance
type Output = F32Distance
The resulting type after applying the
* operator.Source§fn mul(self, other: F32Distance) -> F32Distance
fn mul(self, other: F32Distance) -> F32Distance
Performs the
* operation. Read moreSource§impl Ord for F32Distance
impl Ord for F32Distance
Source§fn cmp(&self, other: &F32Distance) -> Ordering
fn cmp(&self, other: &F32Distance) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for F32Distance
impl PartialEq for F32Distance
Source§impl PartialOrd for F32Distance
impl PartialOrd for F32Distance
Source§impl Rem for F32Distance
impl Rem for F32Distance
Source§type Output = F32Distance
type Output = F32Distance
The resulting type after applying the
% operator.Source§fn rem(self, other: F32Distance) -> F32Distance
fn rem(self, other: F32Distance) -> F32Distance
Performs the
% operation. Read moreSource§impl Sub for F32Distance
impl Sub for F32Distance
Source§type Output = F32Distance
type Output = F32Distance
The resulting type after applying the
- operator.Source§fn sub(self, other: F32Distance) -> F32Distance
fn sub(self, other: F32Distance) -> F32Distance
Performs the
- operation. Read moreSource§impl TryFrom<DistanceProto> for F32Distance
impl TryFrom<DistanceProto> for F32Distance
Source§type Error = ProtoConversionError
type Error = ProtoConversionError
The type returned in the event of a conversion error.
Source§fn try_from(proto: DistanceProto) -> Result<Self, ProtoConversionError>
fn try_from(proto: DistanceProto) -> Result<Self, ProtoConversionError>
Performs the conversion.
impl Copy for F32Distance
impl Eq for F32Distance
Auto Trait Implementations§
impl Freeze for F32Distance
impl RefUnwindSafe for F32Distance
impl Send for F32Distance
impl Sync for F32Distance
impl Unpin for F32Distance
impl UnsafeUnpin for F32Distance
impl UnwindSafe for F32Distance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.