pub struct Number(/* private fields */);
Expand description
A number.
It represents a signed 63-bit integer by default. If the float
feature is
enabled, it represents a 64-bit floating-point number.
Implementations§
source§impl Number
impl Number
sourcepub const fn new(number: NumberRepresentation) -> Self
pub const fn new(number: NumberRepresentation) -> Self
Creates a number.
sourcepub const fn to_representation(self) -> NumberRepresentation
pub const fn to_representation(self) -> NumberRepresentation
Converts a number to a number representation.
Trait Implementations§
source§impl PartialOrd for Number
impl PartialOrd for Number
impl Copy for Number
impl StructuralPartialEq 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
)