[−][src]Struct baseless::Number
Implementations
impl<'base> Number<'base>
[src]
pub fn new(base: &'base Base) -> Self
[src]
pub fn with_capacity(base: &'base Base, digits: usize) -> Self
[src]
pub fn digits(&self) -> usize
[src]
pub fn power(&self) -> isize
[src]
pub fn sign(&self) -> Sign
[src]
pub fn positive(&self) -> bool
[src]
pub fn negative(&self) -> bool
[src]
pub fn get(&self, idx: usize) -> Option<Digit>
[src]
Vector API
pub fn set(&mut self, idx: usize, digit: Digit)
[src]
pub fn push_high(&mut self, digit: Digit)
[src]
Adds a new digit to the highest-order position
pub fn pop_high(&mut self) -> Option<Digit>
[src]
Removes the digit from the highest order position, and returns it (if it exists)
pub fn push_low(&mut self, digit: Digit)
[src]
Adds a new digit to the lowest-order position
pub fn pop_low(&mut self) -> Option<Digit>
[src]
Removes the digit from the lowest order position, and returns it (if it exists)
pub fn add_digit(&mut self, digit: Digit, power: isize)
[src]
pub fn negate(&mut self)
[src]
pub fn iter(&self) -> BorrowedNumberIter<'_>ⓘNotable traits for BorrowedNumberIter<'_>
impl Iterator for BorrowedNumberIter<'_> type Item = Digit;
[src]
Notable traits for BorrowedNumberIter<'_>
impl Iterator for BorrowedNumberIter<'_> type Item = Digit;
Trait Implementations
impl<'base> Debug for Number<'base>
[src]
impl Shl<usize> for Number<'_>
[src]
type Output = Self
The resulting type after applying the <<
operator.
fn shl(mut self: Self, rhs: usize) -> Self::Output
[src]
impl Shr<usize> for Number<'_>
[src]
Auto Trait Implementations
impl<'base> RefUnwindSafe for Number<'base>
[src]
impl<'base> Send for Number<'base>
[src]
impl<'base> Sync for Number<'base>
[src]
impl<'base> Unpin for Number<'base>
[src]
impl<'base> UnwindSafe for Number<'base>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,