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

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

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

Implementations

Creates and zero-initializes a FixedUInt.

Returns number of used bits.

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

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

Converts to hex string, given a buffer.

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Performs the += operation. Read more

The resulting type after applying the & operator.

Performs the & operation. Read more

Performs the &= operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

Performs the |= operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

Performs the ^= operation. Read more

returns the smallest finite number this type can represent

returns the largest finite number this type can represent

Adds two numbers, checking for overflow. If overflow happens, None is returned. Read more

Divides two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned. Read more

Multiplies two numbers, checking for underflow or overflow. If underflow or overflow happens, None is returned. Read more

Finds the remainder of dividing two numbers, checking for underflow, overflow and division by zero. If any of that happens, None is returned. Read more

Checked shift left. Computes self << rhs, returning None if rhs is larger than or equal to the number of bits in self. Read more

Checked shift right. Computes self >> rhs, returning None if rhs is larger than or equal to the number of bits in self. Read more

Subtracts two numbers, checking for underflow. If underflow happens, None is returned. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the /= operation. Read more

Performs the /= operation. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Floored integer division. Read more

Floored integer modulo, satisfying: Read more

Greatest Common Divisor (GCD). Read more

Lowest Common Multiple (LCM). Read more

Deprecated, use is_multiple_of instead.

Returns true if self is a multiple of other. Read more

Returns true if the number is even. Read more

Returns true if the number is odd. Read more

Simultaneous truncated integer division and modulus. Returns (quotient, remainder). Read more

Ceiled integer division. Read more

Greatest Common Divisor (GCD) and Lowest Common Multiple (LCM) together. Read more

Greatest common divisor and Bézout coefficients. Read more

Greatest common divisor, least common multiple, and Bézout coefficients.

Simultaneous floored integer division and modulus. Returns (quotient, remainder). Read more

Rounds up to nearest multiple of argument. Read more

Rounds down to nearest multiple of argument. Read more

Formats the value using the given formatter.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

Convert from a string and radix (typically 2..=36). Read more

Creates a number from another value that can be converted into a primitive via the ToPrimitive trait. If the source value cannot be represented by the target type, then None is returned. Read more

Returns the multiplicative identity element of Self, 1. Read more

Sets self to the multiplicative identity element of Self, 1.

Returns true if self is equal to the multiplicative identity. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

Returns a tuple of the sum along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned. Read more

Returns a tuple of the product along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned. Read more

Returns a tuple of the difference along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the number of ones in the binary representation of self. Read more

Returns the number of zeros in the binary representation of self. Read more

Returns the number of leading zeros in the binary representation of self. Read more

Returns the number of trailing zeros in the binary representation of self. Read more

Shifts the bits to the left by a specified amount, n, wrapping the truncated bits to the end of the resulting integer. Read more

Shifts the bits to the right by a specified amount, n, wrapping the truncated bits to the beginning of the resulting integer. Read more

Shifts the bits to the left by a specified amount, n, filling zeros in the least significant bits. Read more

Shifts the bits to the right by a specified amount, n, copying the “sign bit” in the most significant bits even for unsigned types. Read more

Shifts the bits to the left by a specified amount, n, filling zeros in the least significant bits. Read more

Shifts the bits to the right by a specified amount, n, filling zeros in the most significant bits. Read more

Reverses the byte order of the integer. Read more

Convert an integer from big endian to the target’s endianness. Read more

Convert an integer from little endian to the target’s endianness. Read more

Convert self to big endian from the target’s endianness. Read more

Convert self to little endian from the target’s endianness. Read more

Raises self to the power of exp, using exponentiation by squaring. Read more

The resulting type after applying the % operator.

Performs the % operation. Read more

The resulting type after applying the % operator.

Performs the % operation. Read more

Performs the %= operation. Read more

Performs the %= operation. Read more

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

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

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

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

Saturating multiplication. Computes self * other, saturating at the relevant high or low boundary of the type. Read more

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

The resulting type after applying the << operator.

Performs the << operation. Read more

The resulting type after applying the << operator.

Performs the << operation. Read more

The resulting type after applying the << operator.

Performs the << operation. Read more

Performs the <<= operation. Read more

Performs the <<= operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

Performs the >>= operation. Read more

Performs the >>= operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

Performs the -= operation. Read more

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned. Read more

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned. Read more

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned. Read more

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned. Read more

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned. Read more

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned. Read more

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned. Read more

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned. Read more

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned. Read more

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned. Read more

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32. Read more

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more

Formats the value using the given formatter.

Wrapping (modular) addition. Computes self + other, wrapping around at the boundary of the type. Read more

Wrapping (modular) multiplication. Computes self * other, wrapping around at the boundary of the type. Read more

Panic-free bitwise shift-left; yields self << mask(rhs), where mask removes any high order bits of rhs that would cause the shift to exceed the bitwidth of the type. Read more

Panic-free bitwise shift-right; yields self >> mask(rhs), where mask removes any high order bits of rhs that would cause the shift to exceed the bitwidth of the type. Read more

Wrapping (modular) subtraction. Computes self - other, wrapping around at the boundary of the type. Read more

Returns the additive identity element of Self, 0. Read more

Returns true if self is equal to the additive identity.

Sets self to the additive identity element of Self, 0.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.