Enum aws_smithy_types::Number
source · [−]Expand description
A number type that implements Javascript / JSON semantics, modeled on serde_json: https://docs.serde.rs/src/serde_json/number.rs.html#20-22
Variants
PosInt(u64)
Unsigned 64-bit integer value.
NegInt(i64)
Signed 64-bit integer value. The wrapped value is always negative.
Float(f64)
64-bit floating-point value.
Implementations
sourceimpl Number
impl Number
sourcepub fn to_f64_lossy(self) -> f64
pub fn to_f64_lossy(self) -> f64
Converts to an f64
lossily.
Use Number::try_from
to make the conversion only if it is not lossy.
sourcepub fn to_f32_lossy(self) -> f32
pub fn to_f32_lossy(self) -> f32
Converts to an f32
lossily.
Use Number::try_from
to make the conversion only if it is not lossy.
Trait Implementations
sourceimpl PartialEq<Number> for Number
impl PartialEq<Number> for Number
impl Copy for Number
impl StructuralPartialEq for Number
Auto Trait Implementations
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more