#[repr(transparent)]
pub struct U512(pub BUint<8>);
Expand description

Provides safe integer arithmetic.

Operations like +, ‘-’, ‘*’, or ‘/’ sometimes produce overflow which is detected and results in a panic, in of silently wrapping around.

The bit length of output type will be the greater one in the math operation, and if any of the types was signed, then the resulting type will be signed too, otherwise the output type is unsigned.

The underlying value can be retrieved through the .0 index of the U512 tuple.

§Layout

U512 will have the same methods and traits as the built-in counterpart.

Tuple Fields§

§0: BUint<8>

Implementations§

source§

impl U512

source

pub const fn count_ones(self) -> u32

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

source

pub const fn count_zeros(self) -> u32

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

source

pub const fn trailing_zeros(self) -> u32

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

source

pub const fn swap_bytes(self) -> U512

Reverses the byte order of the integer.

source

pub const fn reverse_bits(self) -> U512

Reverses the bit pattern of the integer.

source

pub const fn leading_zeros(self) -> u32

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

source

pub const fn from_be(x: U512) -> U512

Converts an integer from big endian to the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

source

pub const fn from_le(x: U512) -> U512

Converts an integer from little endian to the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

source

pub const fn to_be(self) -> U512

Converts self to big endian from the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

source

pub const fn to_le(self) -> U512

Converts self to little endian from the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

source§

impl U512

source

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

source§

impl U512

source

pub fn to_le_bytes(&self) -> [u8; 64]

source§

impl U512

source

pub const fn from_digits(digits: [u64; 8]) -> U512

source

pub const fn to_digits(&self) -> [u64; 8]

source§

impl U512

source

pub const MIN: U512 = _

source

pub const MAX: U512 = _

source

pub const ZERO: U512 = _

source

pub const ONE: U512 = _

source

pub const TEN: U512 = _

source

pub const BITS: u32 = 512u32

source

pub const BYTES: u32 = 64u32

source

pub const N: usize = 8usize

source§

impl U512

Trait Implementations§

source§

impl Add<&U512> for &U512

§

type Output = <U512 as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, other: &U512) -> <U512 as Add>::Output

Performs the + operation. Read more
source§

impl Add<&U512> for U512

§

type Output = <U512 as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, other: &U512) -> <U512 as Add>::Output

Performs the + operation. Read more
source§

impl Add<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, other: Decimal) -> <U512 as Add<Decimal>>::Output

Performs the + operation. Read more
source§

impl Add<PreciseDecimal> for U512

§

type Output = PreciseDecimal

The resulting type after applying the + operator.
source§

fn add(self, other: PreciseDecimal) -> <U512 as Add<PreciseDecimal>>::Output

Performs the + operation. Read more
source§

impl<'a> Add<U512> for &'a U512

§

type Output = <U512 as Add>::Output

The resulting type after applying the + operator.
source§

fn add(self, other: U512) -> <U512 as Add>::Output

Performs the + operation. Read more
source§

impl Add<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the + operator.
source§

fn add(self, other: U512) -> <Decimal as Add<U512>>::Output

Performs the + operation. Read more
source§

impl Add<U512> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the + operator.
source§

fn add(self, other: U512) -> <PreciseDecimal as Add<U512>>::Output

Performs the + operation. Read more
source§

impl Add for U512

§

type Output = U512

The resulting type after applying the + operator.
source§

fn add(self, other: U512) -> U512

Performs the + operation. Read more
source§

impl AddAssign<&U512> for U512

source§

fn add_assign(&mut self, other: &U512)

Performs the += operation. Read more
source§

impl AddAssign<U512> for Decimal

source§

fn add_assign(&mut self, other: U512)

Performs the += operation. Read more
source§

impl AddAssign<U512> for PreciseDecimal

source§

fn add_assign(&mut self, other: U512)

Performs the += operation. Read more
source§

impl AddAssign for U512

source§

fn add_assign(&mut self, other: U512)

Performs the += operation. Read more
source§

impl BitAnd for U512

§

type Output = U512

The resulting type after applying the & operator.
source§

fn bitand(self, other: U512) -> U512

Performs the & operation. Read more
source§

impl BitAndAssign for U512

source§

fn bitand_assign(&mut self, other: U512)

Performs the &= operation. Read more
source§

impl BitOr for U512

§

type Output = U512

The resulting type after applying the | operator.
source§

fn bitor(self, other: U512) -> U512

Performs the | operation. Read more
source§

impl BitOrAssign for U512

source§

fn bitor_assign(&mut self, other: U512)

Performs the |= operation. Read more
source§

impl BitXor for U512

§

type Output = U512

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: U512) -> U512

Performs the ^ operation. Read more
source§

impl BitXorAssign for U512

source§

fn bitxor_assign(&mut self, other: U512)

Performs the ^= operation. Read more
source§

impl Cbrt for U512

source§

fn cbrt(self) -> U512

source§

impl CheckedAdd<Decimal> for U512

source§

impl CheckedAdd<PreciseDecimal> for U512

source§

impl CheckedAdd<U512> for Decimal

source§

impl CheckedAdd<U512> for PreciseDecimal

source§

impl CheckedAdd for U512

source§

impl CheckedDiv<Decimal> for U512

source§

impl CheckedDiv<PreciseDecimal> for U512

source§

impl CheckedDiv<U512> for Decimal

source§

impl CheckedDiv<U512> for PreciseDecimal

source§

impl CheckedDiv for U512

source§

impl CheckedMul<Decimal> for U512

source§

impl CheckedMul<PreciseDecimal> for U512

source§

impl CheckedMul<U512> for Decimal

source§

impl CheckedMul<U512> for PreciseDecimal

source§

impl CheckedMul for U512

source§

impl CheckedSub<Decimal> for U512

source§

impl CheckedSub<PreciseDecimal> for U512

source§

impl CheckedSub<U512> for Decimal

source§

impl CheckedSub<U512> for PreciseDecimal

source§

impl CheckedSub for U512

source§

impl Clone for U512

source§

fn clone(&self) -> U512

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for U512

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for U512

source§

fn default() -> U512

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

impl Display for U512

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Div<&U512> for &U512

§

type Output = <U512 as Div>::Output

The resulting type after applying the / operator.
source§

fn div(self, other: &U512) -> <U512 as Div>::Output

Performs the / operation. Read more
source§

impl Div<&U512> for U512

§

type Output = <U512 as Div>::Output

The resulting type after applying the / operator.
source§

fn div(self, other: &U512) -> <U512 as Div>::Output

Performs the / operation. Read more
source§

impl Div<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, other: Decimal) -> <U512 as Div<Decimal>>::Output

Performs the / operation. Read more
source§

impl Div<PreciseDecimal> for U512

§

type Output = PreciseDecimal

The resulting type after applying the / operator.
source§

fn div(self, other: PreciseDecimal) -> <U512 as Div<PreciseDecimal>>::Output

Performs the / operation. Read more
source§

impl<'a> Div<U512> for &'a U512

§

type Output = <U512 as Div>::Output

The resulting type after applying the / operator.
source§

fn div(self, other: U512) -> <U512 as Div>::Output

Performs the / operation. Read more
source§

impl Div<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the / operator.
source§

fn div(self, other: U512) -> <Decimal as Div<U512>>::Output

Performs the / operation. Read more
source§

impl Div<U512> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the / operator.
source§

fn div(self, other: U512) -> <PreciseDecimal as Div<U512>>::Output

Performs the / operation. Read more
source§

impl Div for U512

§

type Output = U512

The resulting type after applying the / operator.
source§

fn div(self, other: U512) -> U512

Performs the / operation. Read more
source§

impl DivAssign<&U512> for U512

source§

fn div_assign(&mut self, other: &U512)

Performs the /= operation. Read more
source§

impl DivAssign<U512> for Decimal

source§

fn div_assign(&mut self, other: U512)

Performs the /= operation. Read more
source§

impl DivAssign<U512> for PreciseDecimal

source§

fn div_assign(&mut self, other: U512)

Performs the /= operation. Read more
source§

impl DivAssign for U512

source§

fn div_assign(&mut self, other: U512)

Performs the /= operation. Read more
source§

impl From<U192> for U512

source§

fn from(val: U192) -> U512

Converts to this type from the input type.
source§

impl From<U256> for U512

source§

fn from(val: U256) -> U512

Converts to this type from the input type.
source§

impl From<U320> for U512

source§

fn from(val: U320) -> U512

Converts to this type from the input type.
source§

impl From<U384> for U512

source§

fn from(val: U384) -> U512

Converts to this type from the input type.
source§

impl From<U448> for U512

source§

fn from(val: U448) -> U512

Converts to this type from the input type.
source§

impl From<U512> for BigInt

source§

fn from(val: U512) -> BigInt

Converts to this type from the input type.
source§

impl From<U512> for I768

source§

fn from(val: U512) -> I768

Converts to this type from the input type.
source§

impl From<U512> for U768

source§

fn from(val: U512) -> U768

Converts to this type from the input type.
source§

impl From<u128> for U512

source§

fn from(val: u128) -> U512

Converts to this type from the input type.
source§

impl From<u16> for U512

source§

fn from(val: u16) -> U512

Converts to this type from the input type.
source§

impl From<u32> for U512

source§

fn from(val: u32) -> U512

Converts to this type from the input type.
source§

impl From<u64> for U512

source§

fn from(val: u64) -> U512

Converts to this type from the input type.
source§

impl From<u8> for U512

source§

fn from(val: u8) -> U512

Converts to this type from the input type.
source§

impl From<usize> for U512

source§

fn from(val: usize) -> U512

Converts to this type from the input type.
source§

impl FromPrimitive for U512

source§

fn from_u8(n: u8) -> Option<U512>

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

fn from_u16(n: u16) -> Option<U512>

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

fn from_u32(n: u32) -> Option<U512>

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

fn from_u64(n: u64) -> Option<U512>

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

fn from_u128(n: u128) -> Option<U512>

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
source§

fn from_usize(n: usize) -> Option<U512>

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

fn from_i8(n: i8) -> Option<U512>

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

fn from_i16(n: i16) -> Option<U512>

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

fn from_i32(n: i32) -> Option<U512>

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

fn from_i64(n: i64) -> Option<U512>

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

fn from_i128(n: i128) -> Option<U512>

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
source§

fn from_isize(n: isize) -> Option<U512>

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

fn from_f32(n: f32) -> Option<Self>

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

fn from_f64(n: f64) -> Option<Self>

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
source§

impl FromStr for U512

§

type Err = ParseU512Error

The associated error which can be returned from parsing.
source§

fn from_str(val: &str) -> Result<U512, <U512 as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for U512

source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Mul<&U512> for &U512

§

type Output = <U512 as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, other: &U512) -> <U512 as Mul>::Output

Performs the * operation. Read more
source§

impl Mul<&U512> for U512

§

type Output = <U512 as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, other: &U512) -> <U512 as Mul>::Output

Performs the * operation. Read more
source§

impl Mul<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, other: Decimal) -> <U512 as Mul<Decimal>>::Output

Performs the * operation. Read more
source§

impl Mul<PreciseDecimal> for U512

§

type Output = PreciseDecimal

The resulting type after applying the * operator.
source§

fn mul(self, other: PreciseDecimal) -> <U512 as Mul<PreciseDecimal>>::Output

Performs the * operation. Read more
source§

impl<'a> Mul<U512> for &'a U512

§

type Output = <U512 as Mul>::Output

The resulting type after applying the * operator.
source§

fn mul(self, other: U512) -> <U512 as Mul>::Output

Performs the * operation. Read more
source§

impl Mul<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the * operator.
source§

fn mul(self, other: U512) -> <Decimal as Mul<U512>>::Output

Performs the * operation. Read more
source§

impl Mul<U512> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the * operator.
source§

fn mul(self, other: U512) -> <PreciseDecimal as Mul<U512>>::Output

Performs the * operation. Read more
source§

impl Mul for U512

§

type Output = U512

The resulting type after applying the * operator.
source§

fn mul(self, other: U512) -> U512

Performs the * operation. Read more
source§

impl MulAssign<&U512> for U512

source§

fn mul_assign(&mut self, other: &U512)

Performs the *= operation. Read more
source§

impl MulAssign<U512> for Decimal

source§

fn mul_assign(&mut self, other: U512)

Performs the *= operation. Read more
source§

impl MulAssign<U512> for PreciseDecimal

source§

fn mul_assign(&mut self, other: U512)

Performs the *= operation. Read more
source§

impl MulAssign for U512

source§

fn mul_assign(&mut self, other: U512)

Performs the *= operation. Read more
source§

impl Not for &U512

§

type Output = <U512 as Not>::Output

The resulting type after applying the ! operator.
source§

fn not(self) -> <U512 as Not>::Output

Performs the unary ! operation. Read more
source§

impl Not for U512

§

type Output = U512

The resulting type after applying the ! operator.
source§

fn not(self) -> U512

Performs the unary ! operation. Read more
source§

impl NthRoot for U512

source§

fn nth_root(self, n: u32) -> U512

source§

impl One for U512

source§

fn one() -> U512

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

fn set_one(&mut self)

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

fn is_one(&self) -> bool
where Self: PartialEq,

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

impl Ord for U512

source§

fn cmp(&self, other: &U512) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for U512

source§

fn eq(&self, other: &U512) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for U512

source§

fn partial_cmp(&self, other: &U512) -> Option<Ordering>

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

fn lt(&self, other: &Rhs) -> bool

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

fn le(&self, other: &Rhs) -> bool

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

fn gt(&self, other: &Rhs) -> bool

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

fn ge(&self, other: &Rhs) -> bool

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

impl Pow<u32> for U512

source§

fn pow(self, exp: u32) -> U512

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

§

type Output = U512

The result after applying the operator.
source§

impl Rem<&U512> for &U512

§

type Output = <U512 as Rem>::Output

The resulting type after applying the % operator.
source§

fn rem(self, other: &U512) -> <U512 as Rem>::Output

Performs the % operation. Read more
source§

impl Rem<&U512> for U512

§

type Output = <U512 as Rem>::Output

The resulting type after applying the % operator.
source§

fn rem(self, other: &U512) -> <U512 as Rem>::Output

Performs the % operation. Read more
source§

impl<'a> Rem<U512> for &'a U512

§

type Output = <U512 as Rem>::Output

The resulting type after applying the % operator.
source§

fn rem(self, other: U512) -> <U512 as Rem>::Output

Performs the % operation. Read more
source§

impl Rem for U512

§

type Output = U512

The resulting type after applying the % operator.
source§

fn rem(self, other: U512) -> U512

Performs the % operation. Read more
source§

impl RemAssign<&U512> for U512

source§

fn rem_assign(&mut self, other: &U512)

Performs the %= operation. Read more
source§

impl RemAssign for U512

source§

fn rem_assign(&mut self, other: U512)

Performs the %= operation. Read more
source§

impl Shl<u32> for U512

§

type Output = U512

The resulting type after applying the << operator.
source§

fn shl(self, other: u32) -> U512

Performs the << operation. Read more
source§

impl ShlAssign<u32> for U512

source§

fn shl_assign(&mut self, other: u32)

Performs the <<= operation. Read more
source§

impl Shr<u32> for U512

§

type Output = U512

The resulting type after applying the >> operator.
source§

fn shr(self, other: u32) -> U512

Performs the >> operation. Read more
source§

impl ShrAssign<u32> for U512

source§

fn shr_assign(&mut self, other: u32)

Performs the >>= operation. Read more
source§

impl Sqrt for U512

source§

fn sqrt(self) -> U512

source§

impl Sub<&U512> for &U512

§

type Output = <U512 as Sub>::Output

The resulting type after applying the - operator.
source§

fn sub(self, other: &U512) -> <U512 as Sub>::Output

Performs the - operation. Read more
source§

impl Sub<&U512> for U512

§

type Output = <U512 as Sub>::Output

The resulting type after applying the - operator.
source§

fn sub(self, other: &U512) -> <U512 as Sub>::Output

Performs the - operation. Read more
source§

impl Sub<Decimal> for U512

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, other: Decimal) -> <U512 as Sub<Decimal>>::Output

Performs the - operation. Read more
source§

impl Sub<PreciseDecimal> for U512

§

type Output = PreciseDecimal

The resulting type after applying the - operator.
source§

fn sub(self, other: PreciseDecimal) -> <U512 as Sub<PreciseDecimal>>::Output

Performs the - operation. Read more
source§

impl<'a> Sub<U512> for &'a U512

§

type Output = <U512 as Sub>::Output

The resulting type after applying the - operator.
source§

fn sub(self, other: U512) -> <U512 as Sub>::Output

Performs the - operation. Read more
source§

impl Sub<U512> for Decimal

§

type Output = Decimal

The resulting type after applying the - operator.
source§

fn sub(self, other: U512) -> <Decimal as Sub<U512>>::Output

Performs the - operation. Read more
source§

impl Sub<U512> for PreciseDecimal

§

type Output = PreciseDecimal

The resulting type after applying the - operator.
source§

fn sub(self, other: U512) -> <PreciseDecimal as Sub<U512>>::Output

Performs the - operation. Read more
source§

impl Sub for U512

§

type Output = U512

The resulting type after applying the - operator.
source§

fn sub(self, other: U512) -> U512

Performs the - operation. Read more
source§

impl SubAssign<&U512> for U512

source§

fn sub_assign(&mut self, other: &U512)

Performs the -= operation. Read more
source§

impl SubAssign<U512> for Decimal

source§

fn sub_assign(&mut self, other: U512)

Performs the -= operation. Read more
source§

impl SubAssign<U512> for PreciseDecimal

source§

fn sub_assign(&mut self, other: U512)

Performs the -= operation. Read more
source§

impl SubAssign for U512

source§

fn sub_assign(&mut self, other: U512)

Performs the -= operation. Read more
source§

impl ToPrimitive for U512

source§

fn to_u8(&self) -> Option<u8>

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

fn to_u16(&self) -> Option<u16>

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

fn to_u32(&self) -> Option<u32>

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

fn to_u64(&self) -> Option<u64>

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

fn to_u128(&self) -> Option<u128>

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
source§

fn to_usize(&self) -> Option<usize>

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

fn to_i8(&self) -> Option<i8>

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

fn to_i16(&self) -> Option<i16>

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

fn to_i32(&self) -> Option<i32>

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

fn to_i64(&self) -> Option<i64>

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

fn to_i128(&self) -> Option<i128>

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
source§

fn to_isize(&self) -> Option<isize>

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

fn to_f32(&self) -> Option<f32>

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.
source§

fn to_f64(&self) -> Option<f64>

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
source§

impl TryFrom<&[u8]> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(bytes: &[u8]) -> Result<U512, <U512 as TryFrom<&[u8]>>::Error>

Performs the conversion.
source§

impl TryFrom<BigInt> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: BigInt) -> Result<U512, <U512 as TryFrom<BigInt>>::Error>

Performs the conversion.
source§

impl TryFrom<I192> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: I192) -> Result<U512, <U512 as TryFrom<I192>>::Error>

Performs the conversion.
source§

impl TryFrom<I256> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: I256) -> Result<U512, <U512 as TryFrom<I256>>::Error>

Performs the conversion.
source§

impl TryFrom<I320> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: I320) -> Result<U512, <U512 as TryFrom<I320>>::Error>

Performs the conversion.
source§

impl TryFrom<I384> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: I384) -> Result<U512, <U512 as TryFrom<I384>>::Error>

Performs the conversion.
source§

impl TryFrom<I448> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: I448) -> Result<U512, <U512 as TryFrom<I448>>::Error>

Performs the conversion.
source§

impl TryFrom<I512> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: I512) -> Result<U512, <U512 as TryFrom<I512>>::Error>

Performs the conversion.
source§

impl TryFrom<I768> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: I768) -> Result<U512, <U512 as TryFrom<I768>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for Decimal

§

type Error = ParseDecimalError

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<Decimal, <Decimal as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for I192

§

type Error = ParseI192Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<I192, <I192 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for I256

§

type Error = ParseI256Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<I256, <I256 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for I320

§

type Error = ParseI320Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<I320, <I320 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for I384

§

type Error = ParseI384Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<I384, <I384 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for I448

§

type Error = ParseI448Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<I448, <I448 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for I512

§

type Error = ParseI512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<I512, <I512 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for PreciseDecimal

§

type Error = ParsePreciseDecimalError

The type returned in the event of a conversion error.
source§

fn try_from( val: U512 ) -> Result<PreciseDecimal, <PreciseDecimal as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for U192

§

type Error = ParseU192Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<U192, <U192 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for U256

§

type Error = ParseU256Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<U256, <U256 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for U320

§

type Error = ParseU320Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<U320, <U320 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for U384

§

type Error = ParseU384Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<U384, <U384 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for U448

§

type Error = ParseU448Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<U448, <U448 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for i128

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<i128, <i128 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for i16

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<i16, <i16 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for i32

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<i32, <i32 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for i64

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<i64, <i64 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for i8

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<i8, <i8 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for isize

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<isize, <isize as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for u128

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<u128, <u128 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for u16

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<u16, <u16 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for u32

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<u32, <u32 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for u64

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<u64, <u64 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for u8

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<u8, <u8 as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U512> for usize

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U512) -> Result<usize, <usize as TryFrom<U512>>::Error>

Performs the conversion.
source§

impl TryFrom<U768> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: U768) -> Result<U512, <U512 as TryFrom<U768>>::Error>

Performs the conversion.
source§

impl TryFrom<Vec<u8>> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(bytes: Vec<u8>) -> Result<U512, <U512 as TryFrom<Vec<u8>>>::Error>

Performs the conversion.
source§

impl TryFrom<i128> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: i128) -> Result<U512, <U512 as TryFrom<i128>>::Error>

Performs the conversion.
source§

impl TryFrom<i16> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: i16) -> Result<U512, <U512 as TryFrom<i16>>::Error>

Performs the conversion.
source§

impl TryFrom<i32> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: i32) -> Result<U512, <U512 as TryFrom<i32>>::Error>

Performs the conversion.
source§

impl TryFrom<i64> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: i64) -> Result<U512, <U512 as TryFrom<i64>>::Error>

Performs the conversion.
source§

impl TryFrom<i8> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: i8) -> Result<U512, <U512 as TryFrom<i8>>::Error>

Performs the conversion.
source§

impl TryFrom<isize> for U512

§

type Error = ParseU512Error

The type returned in the event of a conversion error.
source§

fn try_from(val: isize) -> Result<U512, <U512 as TryFrom<isize>>::Error>

Performs the conversion.
source§

impl Zero for U512

source§

fn zero() -> U512

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

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

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

impl Copy for U512

source§

impl Eq for U512

Auto Trait Implementations§

§

impl RefUnwindSafe for U512

§

impl Send for U512

§

impl Sync for U512

§

impl Unpin for U512

§

impl UnwindSafe for U512

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for T
where T: Hash + ?Sized,

§

fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<A, E> ResolvableDecimal for A
where A: TryInto<Decimal, Error = E>, E: Debug,

§

fn resolve(self) -> Decimal

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

source§

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>,

source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,