[][src]Struct baseless::Number

pub struct Number<'base> { /* fields omitted */ }

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]

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.

impl Shr<usize> for Number<'_>[src]

type Output = Self

The resulting type after applying the >> operator.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.