pub enum Number {
Float(f64),
UInteger(u128),
Integer(i128),
}
Variants§
Implementations§
source§impl Number
impl Number
pub fn is_float(&self) -> bool
pub fn is_unsigned_integer(&self) -> bool
pub fn is_signed_integer(&self) -> bool
pub fn as_f32(&self) -> Option<f32>
pub fn as_f64(&self) -> Option<f64>
pub fn as_i8(&self) -> Option<i8>
pub fn as_i16(&self) -> Option<i16>
pub fn as_i32(&self) -> Option<i32>
pub fn as_i64(&self) -> Option<i64>
pub fn as_i128(&self) -> Option<i128>
pub fn as_u8(&self) -> Option<u8>
pub fn as_u16(&self) -> Option<u16>
pub fn as_u32(&self) -> Option<u32>
pub fn as_u64(&self) -> Option<u64>
pub fn as_u128(&self) -> Option<u128>
Trait Implementations§
source§impl PartialOrd for Number
impl PartialOrd for Number
impl Copy for Number
Auto Trait Implementations§
impl Freeze for Number
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)