Skip to main content

Integer

Struct Integer 

pub struct Integer(/* private fields */);
Expand description

Big integer type used in this crate

Implementations§

§

impl Integer

pub fn to_bytes_lsf(&self) -> Vec<u8>

Converts to bytes, with bytes representing least significant base256 digits appearing first. Discards the sign

§Example
let x = Integer::from(0x11223344);
assert_eq!(x.to_bytes_lsf(), vec![0x44, 0x33, 0x22, 0x11]);

pub fn to_bytes_msf(&self) -> Vec<u8>

Converts to bytes, with bytes representing most significant base256 digits appearing first. Discards the sign

§Example
let x = Integer::from(0x11223344);
assert_eq!(x.to_bytes_msf(), vec![0x11, 0x22, 0x33, 0x44]);

pub fn to_bytes_msf_signed(&self) -> (Vec<u8>, Sign)

Converts to bytes, with bytes representing most significant base256 digits appearing first

§Example
let x = Integer::from(-0x11223344);
assert_eq!(x.to_bytes_msf_signed(), (vec![0x11, 0x22, 0x33, 0x44],
Sign::Negative));

pub fn from_bytes_msf(bytes: &[u8]) -> Integer

Converts bytes to Integer. Inverse of Integer::to_bytes_msf

pub fn from_bytes_msf_signed(bytes: &[u8], sign: Sign) -> Integer

Converts bytes to Integer. Inverse of Integer::to_bytes_msf_signed

pub fn to_str_radix(&self, radix: u16) -> String

Returns a string representation of the number for the specified radix

pub fn from_str_radix(s: &str, radix: u16) -> Option<Integer>

Parses the integer using the given radix

pub fn to_num_bigint(self) -> BigInt

Convert the number to the underlying backend representation

pub fn from_num_bigint(x: BigInt) -> Integer

Convert the number from the underlying backend representation

§

impl Integer

pub fn one() -> Integer

pub fn zero() -> Integer

pub fn is_one(&self) -> bool

pub fn is_even(&self) -> bool

pub fn abs(self) -> Integer

pub fn cmp_abs(&self, other: &Integer) -> Ordering

pub fn lcm_ref(&self, other: &Integer) -> Integer

pub fn gcd_ref(&self, other: &Integer) -> Integer

pub fn cmp0(&self) -> Ordering

pub fn sign(&self) -> Sign

pub fn pow_mod(self, exponent: &Integer, modulo: &Integer) -> Option<Integer>

pub fn pow_mod_ref( &self, exponent: &Integer, modulo: &Integer, ) -> Option<Integer>

pub fn u_pow_u(base: u32, exponent: u32) -> Integer

pub fn square(self) -> Integer

pub fn square_ref(&self) -> Integer

pub fn sqrt(self) -> Option<Integer>

pub fn sqrt_ref(&self) -> Option<Integer>

pub fn modulo(self, divisor: &Integer) -> Integer

pub fn modulo_ref(&self, divisor: &Integer) -> Integer

pub fn modulo_mut(&mut self, divisor: &Integer) -> &mut Integer

pub fn mod_u(&self, modulo: u32) -> u32

pub fn significant_bits(&self) -> u64

pub fn significant_dwords(&self) -> usize

pub fn invert(self, modulo: &Integer) -> Option<Integer>

pub fn invert_ref(&self, modulo: &Integer) -> Option<Integer>

pub fn set_bit(&mut self, index: u32, value: bool) -> &mut Integer

pub fn random_below(self, rng: &mut impl RngCore) -> Integer

pub fn random_below_ref(&self, rng: &mut impl RngCore) -> Integer

pub fn random_bits(bits: u32, rng: &mut impl RngCore) -> Integer

pub fn random_bits_signed(bits: u32, rng: &mut impl RngCore) -> Integer

pub fn assign_random_below( &mut self, modulo: &Integer, rng: &mut impl RngCore, ) -> &mut Integer

pub fn assign_random_bits( &mut self, bits: u32, rng: &mut impl RngCore, ) -> &mut Integer

pub fn is_probably_prime(&self, _reps: u32, rng: &mut impl RngCore) -> IsPrime

pub fn generate_prime(rng: &mut impl RngCore, bit_size: u32) -> Integer

pub fn jacobi(&self, n: &Integer) -> i32

Compute jacobi symbol of a over n

Requires odd n >= 3. If it doesn’t hold, function panics if debug asserts are enabled, or returns 0 otherwise.

Implementation is taken from Handbook of Applied cryptography, p. 73, Algorithm 2.149

pub fn combine( &self, l: &Integer, le: &Integer, r: &Integer, re: &Integer, ) -> Option<Integer>

Compute l^le * r^re modulo self

§

impl Integer

pub fn in_mult_group_of(&self, n: &Integer) -> bool

Checks that self is in Z*n

pub fn abs_in_mult_group_of(&self, n: &Integer) -> bool

Checks that abs(self) is in Z*n

pub fn sample_in_mult_group_of(rng: &mut impl RngCore, n: &Integer) -> Integer

Samples x in Z*_n

pub fn sample_pm_in_mult_group_of( rng: &mut impl RngCore, n: &Integer, ) -> Integer

Samples x such that abs(x) is in Z*_n

pub fn generate_safe_prime(rng: &mut impl RngCore, bits: u32) -> Integer

Generates a random safe prime

Trait Implementations§

§

impl Add<&Integer> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: &Integer) -> Integer

Performs the + operation. Read more
§

impl Add<&Integer> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: &Integer) -> Integer

Performs the + operation. Read more
§

impl Add<&Integer> for u32

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: &Integer) -> Integer

Performs the + operation. Read more
§

impl Add<Integer> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: Integer) -> Integer

Performs the + operation. Read more
§

impl Add<Integer> for u32

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: Integer) -> Integer

Performs the + operation. Read more
§

impl Add<i16> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i16) -> Integer

Performs the + operation. Read more
§

impl Add<i16> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i16) -> Integer

Performs the + operation. Read more
§

impl Add<i32> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i32) -> Integer

Performs the + operation. Read more
§

impl Add<i32> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i32) -> Integer

Performs the + operation. Read more
§

impl Add<i64> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i64) -> Integer

Performs the + operation. Read more
§

impl Add<i64> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i64) -> Integer

Performs the + operation. Read more
§

impl Add<i8> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i8) -> Integer

Performs the + operation. Read more
§

impl Add<i8> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: i8) -> Integer

Performs the + operation. Read more
§

impl Add<isize> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: isize) -> Integer

Performs the + operation. Read more
§

impl Add<isize> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: isize) -> Integer

Performs the + operation. Read more
§

impl Add<u16> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u16) -> Integer

Performs the + operation. Read more
§

impl Add<u16> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u16) -> Integer

Performs the + operation. Read more
§

impl Add<u32> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u32) -> Integer

Performs the + operation. Read more
§

impl Add<u32> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u32) -> Integer

Performs the + operation. Read more
§

impl Add<u64> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u64) -> Integer

Performs the + operation. Read more
§

impl Add<u64> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u64) -> Integer

Performs the + operation. Read more
§

impl Add<u8> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u8) -> Integer

Performs the + operation. Read more
§

impl Add<u8> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: u8) -> Integer

Performs the + operation. Read more
§

impl Add<usize> for &Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: usize) -> Integer

Performs the + operation. Read more
§

impl Add<usize> for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: usize) -> Integer

Performs the + operation. Read more
§

impl Add for Integer

§

type Output = Integer

The resulting type after applying the + operator.
§

fn add(self, rhs: Integer) -> Integer

Performs the + operation. Read more
§

impl AddAssign<&Integer> for Integer

§

fn add_assign(&mut self, rhs: &Integer)

Performs the += operation. Read more
§

impl AddAssign<i16> for Integer

§

fn add_assign(&mut self, rhs: i16)

Performs the += operation. Read more
§

impl AddAssign<i32> for Integer

§

fn add_assign(&mut self, rhs: i32)

Performs the += operation. Read more
§

impl AddAssign<i64> for Integer

§

fn add_assign(&mut self, rhs: i64)

Performs the += operation. Read more
§

impl AddAssign<i8> for Integer

§

fn add_assign(&mut self, rhs: i8)

Performs the += operation. Read more
§

impl AddAssign<isize> for Integer

§

fn add_assign(&mut self, rhs: isize)

Performs the += operation. Read more
§

impl AddAssign<u16> for Integer

§

fn add_assign(&mut self, rhs: u16)

Performs the += operation. Read more
§

impl AddAssign<u32> for Integer

§

fn add_assign(&mut self, rhs: u32)

Performs the += operation. Read more
§

impl AddAssign<u64> for Integer

§

fn add_assign(&mut self, rhs: u64)

Performs the += operation. Read more
§

impl AddAssign<u8> for Integer

§

fn add_assign(&mut self, rhs: u8)

Performs the += operation. Read more
§

impl AddAssign<usize> for Integer

§

fn add_assign(&mut self, rhs: usize)

Performs the += operation. Read more
§

impl AddAssign for Integer

§

fn add_assign(&mut self, rhs: Integer)

Performs the += operation. Read more
§

impl BitAndAssign<u32> for Integer

§

fn bitand_assign(&mut self, rhs: u32)

Performs the &= operation. Read more
§

impl BitOrAssign<u32> for Integer

§

fn bitor_assign(&mut self, rhs: u32)

Performs the |= operation. Read more
§

impl Clone for Integer

§

fn clone(&self) -> Integer

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for Integer

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Integer

§

fn deserialize<D>( deserializer: D, ) -> Result<Integer, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl Display for Integer

§

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

Formats the value using the given formatter. Read more
§

impl Div<&Integer> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: &Integer) -> Integer

Performs the / operation. Read more
§

impl Div<&Integer> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: &Integer) -> Integer

Performs the / operation. Read more
§

impl Div<&Integer> for u32

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: &Integer) -> Integer

Performs the / operation. Read more
§

impl Div<Integer> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: Integer) -> Integer

Performs the / operation. Read more
§

impl Div<Integer> for u32

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: Integer) -> Integer

Performs the / operation. Read more
§

impl Div<i16> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i16) -> Integer

Performs the / operation. Read more
§

impl Div<i16> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i16) -> Integer

Performs the / operation. Read more
§

impl Div<i32> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i32) -> Integer

Performs the / operation. Read more
§

impl Div<i32> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i32) -> Integer

Performs the / operation. Read more
§

impl Div<i64> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i64) -> Integer

Performs the / operation. Read more
§

impl Div<i64> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i64) -> Integer

Performs the / operation. Read more
§

impl Div<i8> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i8) -> Integer

Performs the / operation. Read more
§

impl Div<i8> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: i8) -> Integer

Performs the / operation. Read more
§

impl Div<isize> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: isize) -> Integer

Performs the / operation. Read more
§

impl Div<isize> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: isize) -> Integer

Performs the / operation. Read more
§

impl Div<u16> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u16) -> Integer

Performs the / operation. Read more
§

impl Div<u16> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u16) -> Integer

Performs the / operation. Read more
§

impl Div<u32> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u32) -> Integer

Performs the / operation. Read more
§

impl Div<u32> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u32) -> Integer

Performs the / operation. Read more
§

impl Div<u64> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u64) -> Integer

Performs the / operation. Read more
§

impl Div<u64> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u64) -> Integer

Performs the / operation. Read more
§

impl Div<u8> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u8) -> Integer

Performs the / operation. Read more
§

impl Div<u8> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: u8) -> Integer

Performs the / operation. Read more
§

impl Div<usize> for &Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: usize) -> Integer

Performs the / operation. Read more
§

impl Div<usize> for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: usize) -> Integer

Performs the / operation. Read more
§

impl Div for Integer

§

type Output = Integer

The resulting type after applying the / operator.
§

fn div(self, rhs: Integer) -> Integer

Performs the / operation. Read more
§

impl DivAssign<&Integer> for Integer

§

fn div_assign(&mut self, rhs: &Integer)

Performs the /= operation. Read more
§

impl DivAssign<i16> for Integer

§

fn div_assign(&mut self, rhs: i16)

Performs the /= operation. Read more
§

impl DivAssign<i32> for Integer

§

fn div_assign(&mut self, rhs: i32)

Performs the /= operation. Read more
§

impl DivAssign<i64> for Integer

§

fn div_assign(&mut self, rhs: i64)

Performs the /= operation. Read more
§

impl DivAssign<i8> for Integer

§

fn div_assign(&mut self, rhs: i8)

Performs the /= operation. Read more
§

impl DivAssign<isize> for Integer

§

fn div_assign(&mut self, rhs: isize)

Performs the /= operation. Read more
§

impl DivAssign<u16> for Integer

§

fn div_assign(&mut self, rhs: u16)

Performs the /= operation. Read more
§

impl DivAssign<u32> for Integer

§

fn div_assign(&mut self, rhs: u32)

Performs the /= operation. Read more
§

impl DivAssign<u64> for Integer

§

fn div_assign(&mut self, rhs: u64)

Performs the /= operation. Read more
§

impl DivAssign<u8> for Integer

§

fn div_assign(&mut self, rhs: u8)

Performs the /= operation. Read more
§

impl DivAssign<usize> for Integer

§

fn div_assign(&mut self, rhs: usize)

Performs the /= operation. Read more
§

impl DivAssign for Integer

§

fn div_assign(&mut self, rhs: Integer)

Performs the /= operation. Read more
§

impl From<i32> for Integer

§

fn from(value: i32) -> Integer

Converts to this type from the input type.
§

impl From<u16> for Integer

§

fn from(value: u16) -> Integer

Converts to this type from the input type.
§

impl From<u32> for Integer

§

fn from(value: u32) -> Integer

Converts to this type from the input type.
§

impl From<u8> for Integer

§

fn from(value: u8) -> Integer

Converts to this type from the input type.
Source§

impl IntegerExt for Integer

Source§

fn to_scalar<C>(&self) -> Scalar<C>
where C: Curve,

Embed BigInt into chosen scalar type
Source§

fn curve_order<C>() -> Integer
where C: Curve,

Returns prime order of curve C
Source§

fn from_rng_half_pm<R>(rng: &mut R, range: &Integer) -> Integer
where R: RngCore,

Generates a random integer in interval [-range/2; range/2] if range is even [-(range-1)/2; (range-1)/2] if range is odd
Source§

fn is_in_half_pm(&self, range: &Integer) -> bool

Checks whether self is in interval [-range/2; range/2] when range is even [-(range-1)/2; (range-1)/2] when range is odd
§

impl Mul<&Integer> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: &Integer) -> Integer

Performs the * operation. Read more
§

impl Mul<&Integer> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: &Integer) -> Integer

Performs the * operation. Read more
§

impl Mul<&Integer> for u32

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: &Integer) -> Integer

Performs the * operation. Read more
§

impl Mul<Integer> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: Integer) -> Integer

Performs the * operation. Read more
§

impl Mul<Integer> for u32

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: Integer) -> Integer

Performs the * operation. Read more
§

impl Mul<i16> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i16) -> Integer

Performs the * operation. Read more
§

impl Mul<i16> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i16) -> Integer

Performs the * operation. Read more
§

impl Mul<i32> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i32) -> Integer

Performs the * operation. Read more
§

impl Mul<i32> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i32) -> Integer

Performs the * operation. Read more
§

impl Mul<i64> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i64) -> Integer

Performs the * operation. Read more
§

impl Mul<i64> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i64) -> Integer

Performs the * operation. Read more
§

impl Mul<i8> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i8) -> Integer

Performs the * operation. Read more
§

impl Mul<i8> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: i8) -> Integer

Performs the * operation. Read more
§

impl Mul<isize> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: isize) -> Integer

Performs the * operation. Read more
§

impl Mul<isize> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: isize) -> Integer

Performs the * operation. Read more
§

impl Mul<u16> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u16) -> Integer

Performs the * operation. Read more
§

impl Mul<u16> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u16) -> Integer

Performs the * operation. Read more
§

impl Mul<u32> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u32) -> Integer

Performs the * operation. Read more
§

impl Mul<u32> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u32) -> Integer

Performs the * operation. Read more
§

impl Mul<u64> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u64) -> Integer

Performs the * operation. Read more
§

impl Mul<u64> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u64) -> Integer

Performs the * operation. Read more
§

impl Mul<u8> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u8) -> Integer

Performs the * operation. Read more
§

impl Mul<u8> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: u8) -> Integer

Performs the * operation. Read more
§

impl Mul<usize> for &Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: usize) -> Integer

Performs the * operation. Read more
§

impl Mul<usize> for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: usize) -> Integer

Performs the * operation. Read more
§

impl Mul for Integer

§

type Output = Integer

The resulting type after applying the * operator.
§

fn mul(self, rhs: Integer) -> Integer

Performs the * operation. Read more
§

impl MulAssign<&Integer> for Integer

§

fn mul_assign(&mut self, rhs: &Integer)

Performs the *= operation. Read more
§

impl MulAssign<i16> for Integer

§

fn mul_assign(&mut self, rhs: i16)

Performs the *= operation. Read more
§

impl MulAssign<i32> for Integer

§

fn mul_assign(&mut self, rhs: i32)

Performs the *= operation. Read more
§

impl MulAssign<i64> for Integer

§

fn mul_assign(&mut self, rhs: i64)

Performs the *= operation. Read more
§

impl MulAssign<i8> for Integer

§

fn mul_assign(&mut self, rhs: i8)

Performs the *= operation. Read more
§

impl MulAssign<isize> for Integer

§

fn mul_assign(&mut self, rhs: isize)

Performs the *= operation. Read more
§

impl MulAssign<u16> for Integer

§

fn mul_assign(&mut self, rhs: u16)

Performs the *= operation. Read more
§

impl MulAssign<u32> for Integer

§

fn mul_assign(&mut self, rhs: u32)

Performs the *= operation. Read more
§

impl MulAssign<u64> for Integer

§

fn mul_assign(&mut self, rhs: u64)

Performs the *= operation. Read more
§

impl MulAssign<u8> for Integer

§

fn mul_assign(&mut self, rhs: u8)

Performs the *= operation. Read more
§

impl MulAssign<usize> for Integer

§

fn mul_assign(&mut self, rhs: usize)

Performs the *= operation. Read more
§

impl MulAssign for Integer

§

fn mul_assign(&mut self, rhs: Integer)

Performs the *= operation. Read more
§

impl Neg for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn neg(self) -> <&Integer as Neg>::Output

Performs the unary - operation. Read more
§

impl Neg for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn neg(self) -> <Integer as Neg>::Output

Performs the unary - operation. Read more
§

impl Ord for Integer

§

fn cmp(&self, other: &Integer) -> 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,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Integer

§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

impl PartialOrd for Integer

§

fn partial_cmp(&self, other: &Integer) -> 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

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

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

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

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

impl Rem<&Integer> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: &Integer) -> Integer

Performs the % operation. Read more
§

impl Rem<&Integer> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: &Integer) -> Integer

Performs the % operation. Read more
§

impl Rem<&Integer> for u32

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: &Integer) -> Integer

Performs the % operation. Read more
§

impl Rem<Integer> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: Integer) -> Integer

Performs the % operation. Read more
§

impl Rem<Integer> for u32

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: Integer) -> Integer

Performs the % operation. Read more
§

impl Rem<i16> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i16) -> Integer

Performs the % operation. Read more
§

impl Rem<i16> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i16) -> Integer

Performs the % operation. Read more
§

impl Rem<i32> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i32) -> Integer

Performs the % operation. Read more
§

impl Rem<i32> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i32) -> Integer

Performs the % operation. Read more
§

impl Rem<i64> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i64) -> Integer

Performs the % operation. Read more
§

impl Rem<i64> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i64) -> Integer

Performs the % operation. Read more
§

impl Rem<i8> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i8) -> Integer

Performs the % operation. Read more
§

impl Rem<i8> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: i8) -> Integer

Performs the % operation. Read more
§

impl Rem<isize> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: isize) -> Integer

Performs the % operation. Read more
§

impl Rem<isize> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: isize) -> Integer

Performs the % operation. Read more
§

impl Rem<u16> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u16) -> Integer

Performs the % operation. Read more
§

impl Rem<u16> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u16) -> Integer

Performs the % operation. Read more
§

impl Rem<u32> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u32) -> Integer

Performs the % operation. Read more
§

impl Rem<u32> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u32) -> Integer

Performs the % operation. Read more
§

impl Rem<u64> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u64) -> Integer

Performs the % operation. Read more
§

impl Rem<u64> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u64) -> Integer

Performs the % operation. Read more
§

impl Rem<u8> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u8) -> Integer

Performs the % operation. Read more
§

impl Rem<u8> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: u8) -> Integer

Performs the % operation. Read more
§

impl Rem<usize> for &Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: usize) -> Integer

Performs the % operation. Read more
§

impl Rem<usize> for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: usize) -> Integer

Performs the % operation. Read more
§

impl Rem for Integer

§

type Output = Integer

The resulting type after applying the % operator.
§

fn rem(self, rhs: Integer) -> Integer

Performs the % operation. Read more
§

impl RemAssign<&Integer> for Integer

§

fn rem_assign(&mut self, rhs: &Integer)

Performs the %= operation. Read more
§

impl RemAssign<i16> for Integer

§

fn rem_assign(&mut self, rhs: i16)

Performs the %= operation. Read more
§

impl RemAssign<i32> for Integer

§

fn rem_assign(&mut self, rhs: i32)

Performs the %= operation. Read more
§

impl RemAssign<i64> for Integer

§

fn rem_assign(&mut self, rhs: i64)

Performs the %= operation. Read more
§

impl RemAssign<i8> for Integer

§

fn rem_assign(&mut self, rhs: i8)

Performs the %= operation. Read more
§

impl RemAssign<isize> for Integer

§

fn rem_assign(&mut self, rhs: isize)

Performs the %= operation. Read more
§

impl RemAssign<u16> for Integer

§

fn rem_assign(&mut self, rhs: u16)

Performs the %= operation. Read more
§

impl RemAssign<u32> for Integer

§

fn rem_assign(&mut self, rhs: u32)

Performs the %= operation. Read more
§

impl RemAssign<u64> for Integer

§

fn rem_assign(&mut self, rhs: u64)

Performs the %= operation. Read more
§

impl RemAssign<u8> for Integer

§

fn rem_assign(&mut self, rhs: u8)

Performs the %= operation. Read more
§

impl RemAssign<usize> for Integer

§

fn rem_assign(&mut self, rhs: usize)

Performs the %= operation. Read more
§

impl RemAssign for Integer

§

fn rem_assign(&mut self, rhs: Integer)

Performs the %= operation. Read more
§

impl Serialize for Integer

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Shl<i32> for &Integer

§

type Output = Integer

The resulting type after applying the << operator.
§

fn shl(self, rhs: i32) -> Integer

Performs the << operation. Read more
§

impl Shl<i32> for Integer

§

type Output = Integer

The resulting type after applying the << operator.
§

fn shl(self, rhs: i32) -> Integer

Performs the << operation. Read more
§

impl Shl<u32> for &Integer

§

type Output = Integer

The resulting type after applying the << operator.
§

fn shl(self, rhs: u32) -> Integer

Performs the << operation. Read more
§

impl Shl<u32> for Integer

§

type Output = Integer

The resulting type after applying the << operator.
§

fn shl(self, rhs: u32) -> Integer

Performs the << operation. Read more
§

impl Shl<usize> for &Integer

§

type Output = Integer

The resulting type after applying the << operator.
§

fn shl(self, rhs: usize) -> Integer

Performs the << operation. Read more
§

impl Shl<usize> for Integer

§

type Output = Integer

The resulting type after applying the << operator.
§

fn shl(self, rhs: usize) -> Integer

Performs the << operation. Read more
§

impl ShlAssign<u32> for Integer

§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
§

impl Shr<i32> for &Integer

§

type Output = Integer

The resulting type after applying the >> operator.
§

fn shr(self, rhs: i32) -> Integer

Performs the >> operation. Read more
§

impl Shr<i32> for Integer

§

type Output = Integer

The resulting type after applying the >> operator.
§

fn shr(self, rhs: i32) -> Integer

Performs the >> operation. Read more
§

impl Shr<u32> for &Integer

§

type Output = Integer

The resulting type after applying the >> operator.
§

fn shr(self, rhs: u32) -> Integer

Performs the >> operation. Read more
§

impl Shr<u32> for Integer

§

type Output = Integer

The resulting type after applying the >> operator.
§

fn shr(self, rhs: u32) -> Integer

Performs the >> operation. Read more
§

impl Shr<usize> for &Integer

§

type Output = Integer

The resulting type after applying the >> operator.
§

fn shr(self, rhs: usize) -> Integer

Performs the >> operation. Read more
§

impl Shr<usize> for Integer

§

type Output = Integer

The resulting type after applying the >> operator.
§

fn shr(self, rhs: usize) -> Integer

Performs the >> operation. Read more
§

impl ShrAssign<u32> for Integer

§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
§

impl Sub<&Integer> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: &Integer) -> Integer

Performs the - operation. Read more
§

impl Sub<&Integer> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: &Integer) -> Integer

Performs the - operation. Read more
§

impl Sub<&Integer> for u32

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: &Integer) -> Integer

Performs the - operation. Read more
§

impl Sub<Integer> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: Integer) -> Integer

Performs the - operation. Read more
§

impl Sub<Integer> for u32

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: Integer) -> Integer

Performs the - operation. Read more
§

impl Sub<i16> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i16) -> Integer

Performs the - operation. Read more
§

impl Sub<i16> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i16) -> Integer

Performs the - operation. Read more
§

impl Sub<i32> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i32) -> Integer

Performs the - operation. Read more
§

impl Sub<i32> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i32) -> Integer

Performs the - operation. Read more
§

impl Sub<i64> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i64) -> Integer

Performs the - operation. Read more
§

impl Sub<i64> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i64) -> Integer

Performs the - operation. Read more
§

impl Sub<i8> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i8) -> Integer

Performs the - operation. Read more
§

impl Sub<i8> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: i8) -> Integer

Performs the - operation. Read more
§

impl Sub<isize> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: isize) -> Integer

Performs the - operation. Read more
§

impl Sub<isize> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: isize) -> Integer

Performs the - operation. Read more
§

impl Sub<u16> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u16) -> Integer

Performs the - operation. Read more
§

impl Sub<u16> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u16) -> Integer

Performs the - operation. Read more
§

impl Sub<u32> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u32) -> Integer

Performs the - operation. Read more
§

impl Sub<u32> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u32) -> Integer

Performs the - operation. Read more
§

impl Sub<u64> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u64) -> Integer

Performs the - operation. Read more
§

impl Sub<u64> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u64) -> Integer

Performs the - operation. Read more
§

impl Sub<u8> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u8) -> Integer

Performs the - operation. Read more
§

impl Sub<u8> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: u8) -> Integer

Performs the - operation. Read more
§

impl Sub<usize> for &Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: usize) -> Integer

Performs the - operation. Read more
§

impl Sub<usize> for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: usize) -> Integer

Performs the - operation. Read more
§

impl Sub for Integer

§

type Output = Integer

The resulting type after applying the - operator.
§

fn sub(self, rhs: Integer) -> Integer

Performs the - operation. Read more
§

impl SubAssign<&Integer> for Integer

§

fn sub_assign(&mut self, rhs: &Integer)

Performs the -= operation. Read more
§

impl SubAssign<i16> for Integer

§

fn sub_assign(&mut self, rhs: i16)

Performs the -= operation. Read more
§

impl SubAssign<i32> for Integer

§

fn sub_assign(&mut self, rhs: i32)

Performs the -= operation. Read more
§

impl SubAssign<i64> for Integer

§

fn sub_assign(&mut self, rhs: i64)

Performs the -= operation. Read more
§

impl SubAssign<i8> for Integer

§

fn sub_assign(&mut self, rhs: i8)

Performs the -= operation. Read more
§

impl SubAssign<isize> for Integer

§

fn sub_assign(&mut self, rhs: isize)

Performs the -= operation. Read more
§

impl SubAssign<u16> for Integer

§

fn sub_assign(&mut self, rhs: u16)

Performs the -= operation. Read more
§

impl SubAssign<u32> for Integer

§

fn sub_assign(&mut self, rhs: u32)

Performs the -= operation. Read more
§

impl SubAssign<u64> for Integer

§

fn sub_assign(&mut self, rhs: u64)

Performs the -= operation. Read more
§

impl SubAssign<u8> for Integer

§

fn sub_assign(&mut self, rhs: u8)

Performs the -= operation. Read more
§

impl SubAssign<usize> for Integer

§

fn sub_assign(&mut self, rhs: usize)

Performs the -= operation. Read more
§

impl SubAssign for Integer

§

fn sub_assign(&mut self, rhs: Integer)

Performs the -= operation. Read more
§

impl Eq for Integer

§

impl StructuralPartialEq for Integer

Auto Trait Implementations§

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

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

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

Source§

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§

fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

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

Source§

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

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
§

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

§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

§

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T
where T: for<'r> GroupOps<&'r Rhs, Output>,

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

§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,