Struct digitex::StaticDigit[][src]

pub struct StaticDigit<D: DigitBase> { /* fields omitted */ }

Generic number expression with variable base

D: DigitBase is used for how the value is expressed.

Bases 2 - Binary, 8 - octal, 10 - decimal, 16 - hexdeximal are prepared by default

If you need custom bases, you can make it in three lines to add, like…

use digitex::DigitBase;

struct Tri;
impl DigitBase for Tri {
    const BASE: u32 = 3;
}

Implementations

impl<D: DigitBase> Digit<D>[src]

pub fn new(n: u64) -> Self[src]

pub fn raw(&self) -> u64[src]

pub fn convert(&self) -> Vec<u32>[src]

Trait Implementations

impl<D: Clone + DigitBase> Clone for Digit<D>[src]

impl<D: Copy + DigitBase> Copy for Digit<D>[src]

impl<D: Debug + DigitBase> Debug for Digit<D>[src]

impl<D: DigitBase> Display for Digit<D>[src]

impl<D: Eq + DigitBase> Eq for Digit<D>[src]

impl<D: PartialEq + DigitBase> PartialEq<Digit<D>> for Digit<D>[src]

impl<D: DigitBase> StructuralEq for Digit<D>[src]

impl<D: DigitBase> StructuralPartialEq for Digit<D>[src]

Auto Trait Implementations

impl<D> RefUnwindSafe for Digit<D>

impl<D> Send for Digit<D>

impl<D> Sync for Digit<D>

impl<D> Unpin for Digit<D>

impl<D> UnwindSafe for Digit<D>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.