pub struct Float(/* private fields */);
Expand description
A floating point number that can safely convert between other number types using compile-time evaluation when possible.
Implementations§
§impl Float
impl Float
pub fn as_f32(&self) -> Result<f32, Error>
pub fn as_f32(&self) -> Result<f32, Error>
Returns this number as an f32, if it can be done without losing precision.
pub fn as_integer(&self) -> Result<Integer, Error>
pub fn as_integer(&self) -> Result<Integer, Error>
Returns this number as an Integer
, if the stored value has no fractional part.
Trait Implementations§
impl Copy for Float
impl StructuralPartialEq for Float
Auto Trait Implementations§
impl RefUnwindSafe for Float
impl Send for Float
impl Sync for Float
impl Unpin for Float
impl UnwindSafe for Float
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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