pub struct FloatWrapper<F>(/* private fields */);Expand description
(internals) A type that wraps a floating-point number and implements Hash.
Exported under the internals feature only.
Not available under no_float.
Implementations§
Source§impl<F: Float> FloatWrapper<F>
impl<F: Float> FloatWrapper<F>
Sourcepub const MAX_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E+12f32
pub const MAX_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E+12f32
Maximum floating-point number for natural display before switching to scientific notation.
Sourcepub const MIN_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E-14f32
pub const MIN_NATURAL_FLOAT_FOR_DISPLAY: f32 = 9.99999982E-14f32
Minimum floating-point number for natural display before switching to scientific notation.
Sourcepub const fn new(value: F) -> Self
pub const fn new(value: F) -> Self
Create a new FloatWrapper.
Trait Implementations§
Source§impl<F: Float> AsMut<F> for FloatWrapper<F>
impl<F: Float> AsMut<F> for FloatWrapper<F>
Source§impl<F: Float> AsRef<F> for FloatWrapper<F>
impl<F: Float> AsRef<F> for FloatWrapper<F>
Source§impl<F: Clone> Clone for FloatWrapper<F>
impl<F: Clone> Clone for FloatWrapper<F>
Source§fn clone(&self) -> FloatWrapper<F>
fn clone(&self) -> FloatWrapper<F>
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<F: Float> Deref for FloatWrapper<F>
impl<F: Float> Deref for FloatWrapper<F>
Source§impl<F: Float> DerefMut for FloatWrapper<F>
impl<F: Float> DerefMut for FloatWrapper<F>
Source§impl<F: Float> From<F> for FloatWrapper<F>
impl<F: Float> From<F> for FloatWrapper<F>
Source§impl From<FloatWrapper<f64>> for Dynamic
Available on non-crate feature no_float only.
impl From<FloatWrapper<f64>> for Dynamic
Available on non-crate feature
no_float only.Source§fn from(value: FloatWrapper<FLOAT>) -> Self
fn from(value: FloatWrapper<FLOAT>) -> Self
Converts to this type from the input type.
Source§impl Hash for FloatWrapper<FLOAT>
impl Hash for FloatWrapper<FLOAT>
Source§impl<F: PartialEq> PartialEq for FloatWrapper<F>
impl<F: PartialEq> PartialEq for FloatWrapper<F>
Source§impl<F: PartialOrd> PartialOrd for FloatWrapper<F>
impl<F: PartialOrd> PartialOrd for FloatWrapper<F>
impl<F: Copy> Copy for FloatWrapper<F>
impl<F: Eq> Eq for FloatWrapper<F>
impl<F> StructuralPartialEq for FloatWrapper<F>
Auto Trait Implementations§
impl<F> Freeze for FloatWrapper<F>where
F: Freeze,
impl<F> RefUnwindSafe for FloatWrapper<F>where
F: RefUnwindSafe,
impl<F> Send for FloatWrapper<F>where
F: Send,
impl<F> Sync for FloatWrapper<F>where
F: Sync,
impl<F> Unpin for FloatWrapper<F>where
F: Unpin,
impl<F> UnwindSafe for FloatWrapper<F>where
F: UnwindSafe,
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> Equivalent<K> for Q
impl<Q, K> Equivalent<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.Source§impl<T> Variant for T
impl<T> Variant for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert this
Variant trait object to &mut dyn Any.Source§fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
Convert this
Variant trait object to Box<dyn Any>.