pub struct Number { /* private fields */ }Available on crate feature
core only.Expand description
An unsigned integer with an automatically selected CESR number code.
Implementations§
Source§impl Number
impl Number
Sourcepub const fn new(value: u128) -> Self
pub const fn new(value: u128) -> Self
Creates a Number choosing the smallest code that fits value.
Sourcepub const fn with_code(code: NumberCode, value: u128) -> Self
pub const fn with_code(code: NumberCode, value: u128) -> Self
Creates a Number with an explicitly specified code.
Sourcepub const fn code(&self) -> &NumberCode
pub const fn code(&self) -> &NumberCode
Returns the CESR number code for this value.
Trait Implementations§
impl Eq 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 UnsafeUnpin 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