pub struct Zero;Expand description
Zero number.
This is a dummy number type that can only represent the value 0.0.
Trait Implementations§
Source§impl Number for Zero
impl Number for Zero
Source§fn as_u32(&self) -> Option<u32>
fn as_u32(&self) -> Option<u32>
Returns this number as an
u32 if it can be exactly represented as such.Source§fn as_u64(&self) -> Option<u64>
fn as_u64(&self) -> Option<u64>
Returns this number as an
u64 if it can be exactly represented as such.Source§fn as_i32(&self) -> Option<i32>
fn as_i32(&self) -> Option<i32>
Returns this number as an
i32 if it can be exactly represented as such.Source§fn as_i64(&self) -> Option<i64>
fn as_i64(&self) -> Option<i64>
Returns this number as an
i64 if it can be exactly represented as such.Source§fn as_f32(&self) -> Option<f32>
fn as_f32(&self) -> Option<f32>
Returns this number as an
f32 if it can be exactly represented as such.Source§fn as_f32_lossy(&self) -> f32
fn as_f32_lossy(&self) -> f32
Returns this number as an
f32, potentially losing precision in the process.Source§fn as_f64(&self) -> Option<f64>
fn as_f64(&self) -> Option<f64>
Returns this number as an
f64 if it can be exactly represented as such.Source§fn as_f64_lossy(&self) -> f64
fn as_f64_lossy(&self) -> f64
Returns this number as an
f64, potentially losing precision in the process.Source§impl Ord for Zero
impl Ord for Zero
Source§impl PartialOrd for Zero
impl PartialOrd for Zero
impl Eq for Zero
impl StructuralPartialEq for Zero
Auto Trait Implementations§
impl Freeze for Zero
impl RefUnwindSafe for Zero
impl Send for Zero
impl Sync for Zero
impl Unpin for Zero
impl UnwindSafe for Zero
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