Struct fixed_bigint::fixeduint::FixedUInt[][src]

pub struct FixedUInt<T, const N: usize> where
    T: MachineWord, 
{ /* fields omitted */ }

Fixed-size unsigned integer, represented by array of N words of builtin unsigned type T

Implementations

impl<T: MachineWord, const N: usize> FixedUInt<T, N>[src]

pub fn new() -> FixedUInt<T, N>[src]

Creates and zero-initializes a FixedUInt.

pub fn bit_length(&self) -> u32[src]

Returns number of used bits.

pub fn div_rem(&self, divisor: &Self) -> (Self, Self)[src]

Performs a division, returning both the quotient and reminder in a tuple.

pub fn from_le_bytes(bytes: &[u8]) -> Self[src]

Create a little-endian integer value from its representation as a byte array in little endian.

pub fn to_hex_str<'a>(&self, result: &'a mut [u8]) -> Result<&'a str, Error>[src]

Converts to hex string, given a buffer.

Trait Implementations

impl<T: MachineWord, const N: usize> Add<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the + operator.

impl<T: MachineWord, const N: usize> BitAnd<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the & operator.

impl<T: MachineWord, const N: usize> BitOr<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the | operator.

impl<T: MachineWord, const N: usize> BitXor<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the ^ operator.

impl<T: MachineWord, const N: usize> Bounded for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> CheckedAdd for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> CheckedDiv for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> CheckedMul for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> CheckedSub for FixedUInt<T, N>[src]

impl<T: Clone, const N: usize> Clone for FixedUInt<T, N> where
    T: MachineWord, 
[src]

impl<T: Copy, const N: usize> Copy for FixedUInt<T, N> where
    T: MachineWord, 
[src]

impl<T: Debug, const N: usize> Debug for FixedUInt<T, N> where
    T: MachineWord, 
[src]

impl<T: MachineWord, const N: usize> Default for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> Div<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the / operator.

impl<T: Eq, const N: usize> Eq for FixedUInt<T, N> where
    T: MachineWord, 
[src]

impl<T: MachineWord, const N: usize> From<u16> for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> From<u32> for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> From<u64> for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> From<u8> for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> FromPrimitive for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> LowerHex for FixedUInt<T, N> where
    u8: TryFrom<T>, 
[src]

impl<T: MachineWord, const N: usize> Mul<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the * operator.

impl<T: MachineWord, const N: usize> Not for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the ! operator.

impl<T: MachineWord, const N: usize> Num for FixedUInt<T, N>[src]

type FromStrRadixErr = ParseIntError

impl<T: MachineWord, const N: usize> NumCast for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> One for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> Ord for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> OverflowingAdd for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> OverflowingSub for FixedUInt<T, N>[src]

impl<T: PartialEq, const N: usize> PartialEq<FixedUInt<T, N>> for FixedUInt<T, N> where
    T: MachineWord, 
[src]

impl<T: MachineWord, const N: usize> PartialOrd<FixedUInt<T, N>> for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> PrimInt for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> Rem<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the % operator.

impl<T: MachineWord, const N: usize> Saturating for FixedUInt<T, N>[src]

Note: This is marked deprecated, but still used by PrimInt

fn saturating_add(self, other: Self) -> Self[src]

Saturating addition operator. Returns a+b, saturating at the numeric bounds instead of overflowing.

fn saturating_sub(self, other: Self) -> Self[src]

Saturating subtraction operator. Returns a-b, saturating at the numeric bounds instead of overflowing.

impl<T: MachineWord, const N: usize> SaturatingAdd for FixedUInt<T, N>[src]

fn saturating_add(&self, other: &Self) -> Self[src]

Saturating addition operator. Returns a+b, saturating at the numeric bounds instead of overflowing.

impl<T: MachineWord, const N: usize> SaturatingSub for FixedUInt<T, N>[src]

fn saturating_sub(&self, other: &Self) -> Self[src]

Saturating subtraction operator. Returns a-b, saturating at the numeric bounds instead of overflowing.

impl<T: MachineWord, const N: usize> Shl<usize> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the << operator.

impl<T: MachineWord, const N: usize> Shr<usize> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the >> operator.

impl<T, const N: usize> StructuralEq for FixedUInt<T, N> where
    T: MachineWord, 
[src]

impl<T, const N: usize> StructuralPartialEq for FixedUInt<T, N> where
    T: MachineWord, 
[src]

impl<T: MachineWord, const N: usize> Sub<FixedUInt<T, N>> for FixedUInt<T, N>[src]

type Output = Self

The resulting type after applying the - operator.

impl<T: MachineWord, const N: usize> ToPrimitive for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> UpperHex for FixedUInt<T, N> where
    u8: TryFrom<T>, 
[src]

impl<T: MachineWord, const N: usize> WrappingAdd for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> WrappingSub for FixedUInt<T, N>[src]

impl<T: MachineWord, const N: usize> Zero for FixedUInt<T, N>[src]

Auto Trait Implementations

impl<T, const N: usize> Send for FixedUInt<T, N> where
    T: Send

impl<T, const N: usize> Sync for FixedUInt<T, N> where
    T: Sync

impl<T, const N: usize> Unpin for FixedUInt<T, N> where
    T: Unpin

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, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[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.