pub struct Number<'base> { /* private fields */ }
Implementations§
Source§impl<'base> Number<'base>
impl<'base> Number<'base>
pub fn new(base: &'base Base) -> Self
pub fn with_capacity(base: &'base Base, digits: usize) -> Self
pub fn digits(&self) -> usize
pub fn power(&self) -> isize
pub fn sign(&self) -> Sign
pub fn positive(&self) -> bool
pub fn negative(&self) -> bool
pub fn set(&mut self, idx: usize, digit: Digit)
Sourcepub fn pop_high(&mut self) -> Option<Digit>
pub fn pop_high(&mut self) -> Option<Digit>
Removes the digit from the highest order position, and returns it (if it exists)
Sourcepub fn pop_low(&mut self) -> Option<Digit>
pub fn pop_low(&mut self) -> Option<Digit>
Removes the digit from the lowest order position, and returns it (if it exists)
pub fn add_digit(&mut self, digit: Digit, power: isize)
pub fn negate(&mut self)
pub fn iter(&self) -> BorrowedNumberIter<'_> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<'base> Freeze for Number<'base>
impl<'base> RefUnwindSafe for Number<'base>
impl<'base> Send for Number<'base>
impl<'base> Sync for Number<'base>
impl<'base> Unpin for Number<'base>
impl<'base> UnwindSafe for Number<'base>
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