snarkvm_console_types_integers

Struct Integer

Source
pub struct Integer<E: Environment, I: IntegerType> { /* private fields */ }

Implementations§

Source§

impl<E: Environment, I: IntegerType> Integer<E, I>

Source

pub fn from_field_lossy(field: &Field<E>) -> Self

Casts an integer from a base field, with lossy truncation.

This method is commonly-used by hash-to-integer algorithms, where the hash output does not need to preserve the full base field.

Source§

impl<E: Environment, I: IntegerType> Integer<E, I>

Source

pub fn to_scalar(&self) -> Scalar<E>

Converts an integer into a scalar.

Source§

impl<E: Environment, I: IntegerType> Integer<E, I>

Source

pub const MAX: Self = _

Source

pub const MIN: Self = _

Source

pub const fn new(integer: I) -> Self

Initializes a new integer.

Trait Implementations§

Source§

impl<E: Environment, I: IntegerType> AbsChecked for Integer<E, I>

Source§

fn abs_checked(self) -> Self::Output

Returns the absolute value of self.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> AbsWrapped for Integer<E, I>

Source§

fn abs_wrapped(self) -> Self::Output

Returns the absolute value of self.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Add<&Integer<E, I>> for Integer<E, I>

Source§

fn add(self, other: &Integer<E, I>) -> Self::Output

Returns the sum of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the + operator.
Source§

impl<E: Environment, I: IntegerType> Add for Integer<E, I>

Source§

fn add(self, other: Integer<E, I>) -> Self::Output

Returns the sum of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the + operator.
Source§

impl<E: Environment, I: IntegerType> AddAssign<&Integer<E, I>> for Integer<E, I>

Source§

fn add_assign(&mut self, other: &Integer<E, I>)

Adds other to self.

Source§

impl<E: Environment, I: IntegerType> AddAssign for Integer<E, I>

Source§

fn add_assign(&mut self, other: Integer<E, I>)

Adds other to self.

Source§

impl<E: Environment, I: IntegerType> AddWrapped for Integer<E, I>

Source§

fn add_wrapped(&self, other: &Integer<E, I>) -> Self::Output

Returns the sum of self and other.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> BitAnd<&Integer<E, I>> for Integer<E, I>

Source§

fn bitand(self, other: &Integer<E, I>) -> Self::Output

Returns the bitwise AND of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the & operator.
Source§

impl<E: Environment, I: IntegerType> BitAnd for Integer<E, I>

Source§

fn bitand(self, other: Self) -> Self::Output

Returns the bitwise AND of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the & operator.
Source§

impl<E: Environment, I: IntegerType> BitAndAssign for Integer<E, I>

Source§

fn bitand_assign(&mut self, other: Self)

Performs the bitwise AND of self and other and assigns the result to self.

Source§

impl<E: Environment, I: IntegerType> BitOr<&Integer<E, I>> for Integer<E, I>

Source§

fn bitor(self, other: &Integer<E, I>) -> Self::Output

Returns the bitwise OR of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the | operator.
Source§

impl<E: Environment, I: IntegerType> BitOr for Integer<E, I>

Source§

fn bitor(self, other: Self) -> Self::Output

Returns the bitwise OR of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the | operator.
Source§

impl<E: Environment, I: IntegerType> BitOrAssign for Integer<E, I>

Source§

fn bitor_assign(&mut self, other: Self)

Performs the bitwise OR of self and other and assigns the result to self.

Source§

impl<E: Environment, I: IntegerType> BitXor<&Integer<E, I>> for Integer<E, I>

Source§

fn bitxor(self, other: &Integer<E, I>) -> Self::Output

Returns the bitwise XOR of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the ^ operator.
Source§

impl<E: Environment, I: IntegerType> BitXor for Integer<E, I>

Source§

fn bitxor(self, other: Self) -> Self::Output

Returns the bitwise XOR of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the ^ operator.
Source§

impl<E: Environment, I: IntegerType> BitXorAssign for Integer<E, I>

Source§

fn bitxor_assign(&mut self, other: Self)

Performs the bitwise XOR of self and other and assigns the result to self.

Source§

impl<E: Clone + Environment, I: Clone + IntegerType> Clone for Integer<E, I>

Source§

fn clone(&self) -> Integer<E, I>

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<E: Environment, I: IntegerType> Compare for Integer<E, I>

Source§

fn is_less_than(&self, other: &Self) -> Self::Output

Returns true if self is less than other.

Source§

fn is_greater_than(&self, other: &Self) -> Self::Output

Returns true if self is greater than other.

Source§

fn is_less_than_or_equal(&self, other: &Self) -> Self::Output

Returns true if self is less than or equal to other.

Source§

fn is_greater_than_or_equal(&self, other: &Self) -> Self::Output

Returns true if self is greater than or equal to other.

Source§

type Output = Boolean<E>

Source§

impl<E: Environment, I: IntegerType> Debug for Integer<E, I>

Source§

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

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

impl<E: Environment, I: IntegerType> Deref for Integer<E, I>

Source§

type Target = I

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<'de, E: Environment, I: IntegerType> Deserialize<'de> for Integer<E, I>

Source§

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

Deserializes the integer from a string or bytes.

Source§

impl<E: Environment, I: IntegerType> Display for Integer<E, I>

Source§

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

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

impl<E: Environment, I: IntegerType> Distribution<Integer<E, I>> for Standard

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Integer<E, I>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<E: Environment, I: IntegerType> Div<&Integer<E, I>> for Integer<E, I>

Source§

fn div(self, other: &Integer<E, I>) -> Self::Output

Returns the quotient of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the / operator.
Source§

impl<E: Environment, I: IntegerType> Div for Integer<E, I>

Source§

fn div(self, other: Integer<E, I>) -> Self::Output

Returns the quotient of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the / operator.
Source§

impl<E: Environment, I: IntegerType> DivAssign<&Integer<E, I>> for Integer<E, I>

Source§

fn div_assign(&mut self, other: &Integer<E, I>)

Divides self by other.

Source§

impl<E: Environment, I: IntegerType> DivAssign for Integer<E, I>

Source§

fn div_assign(&mut self, other: Integer<E, I>)

Divides self by other.

Source§

impl<E: Environment, I: IntegerType> DivWrapped for Integer<E, I>

Source§

fn div_wrapped(&self, other: &Integer<E, I>) -> Self::Output

Returns the quotient of self and other.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Equal for Integer<E, I>

Source§

fn is_equal(&self, other: &Self) -> Self::Output

Returns true if self and other are equal.

Source§

fn is_not_equal(&self, other: &Self) -> Self::Output

Returns true if self and other are not equal.

Source§

type Output = Boolean<E>

Source§

impl<E: Environment, I: IntegerType> FromBits for Integer<E, I>

Source§

fn from_bits_le(bits_le: &[bool]) -> Result<Self>

Initializes a new integer from a list of little-endian bits.

Source§

fn from_bits_be(bits_be: &[bool]) -> Result<Self>

Initializes a new integer from a list of big-endian bits.

Source§

impl<E: Environment, I: IntegerType> FromBytes for Integer<E, I>

Source§

fn read_le<R: Read>(reader: R) -> IoResult<Self>

Reads the integer from a buffer.

Source§

fn from_bytes_le(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized,

Returns Self from a byte array in little-endian order.
Source§

impl<E: Environment, I: IntegerType> FromField for Integer<E, I>

Source§

fn from_field(field: &Self::Field) -> Result<Self>

Casts an integer from a base field.

This method guarantees the following:

  1. If the field element is larger than the integer domain, then the operation will fail.
  2. If the field element is smaller than the integer domain, then the operation will succeed.
Source§

type Field = Field<E>

Source§

impl<E: Environment, I: IntegerType> FromFields for Integer<E, I>

Source§

fn from_fields(fields: &[Self::Field]) -> Result<Self>

Initializes a new integer by recovering the x-coordinate of an affine group from a field element.

Source§

type Field = Field<E>

Source§

impl<E: Environment, I: IntegerType> FromStr for Integer<E, I>

Source§

fn from_str(string: &str) -> Result<Self>

Parses a string into an integer.

Source§

type Err = Error

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

impl<E: Hash + Environment, I: Hash + IntegerType> Hash for Integer<E, I>

Source§

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

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<E: Environment, I: IntegerType> Modulo for Integer<E, I>

Source§

fn modulo(&self, other: &Integer<E, I>) -> Self

Returns the result of taking the modulus of self with respect to other.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Mul<&Integer<E, I>> for Integer<E, I>

Source§

fn mul(self, other: &Integer<E, I>) -> Self::Output

Returns the product of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the * operator.
Source§

impl<E: Environment, I: IntegerType> Mul for Integer<E, I>

Source§

fn mul(self, other: Integer<E, I>) -> Self::Output

Returns the product of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the * operator.
Source§

impl<E: Environment, I: IntegerType> MulAssign<&Integer<E, I>> for Integer<E, I>

Source§

fn mul_assign(&mut self, other: &Integer<E, I>)

Multiplies self by other.

Source§

impl<E: Environment, I: IntegerType> MulAssign for Integer<E, I>

Source§

fn mul_assign(&mut self, other: Integer<E, I>)

Multiplies self by other.

Source§

impl<E: Environment, I: IntegerType> MulWrapped for Integer<E, I>

Source§

fn mul_wrapped(&self, other: &Integer<E, I>) -> Self::Output

Returns the product of self and other.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Neg for Integer<E, I>

Source§

fn neg(self) -> Self::Output

Returns the negation of self.

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

impl<E: Environment, I: IntegerType> Not for Integer<E, I>

Source§

fn not(self) -> Self::Output

Returns the bitwise NOT of self.

Source§

type Output = Integer<E, I>

The resulting type after applying the ! operator.
Source§

impl<E: Environment, I: IntegerType> One for Integer<E, I>

Source§

fn one() -> Self

Returns the 1 element of the integer.

Source§

fn is_one(&self) -> bool

Returns true if the element is one.

Source§

fn set_one(&mut self)

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

impl<E: Environment, I: IntegerType> Ord for Integer<E, I>

Source§

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

Returns the lexicographic ordering of self and other.

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

impl<E: Environment, I: IntegerType> Parser for Integer<E, I>

Source§

fn parse(string: &str) -> ParserResult<'_, Self>

Parses a string into a integer circuit.

Source§

impl<E: PartialEq + Environment, I: PartialEq + IntegerType> PartialEq for Integer<E, I>

Source§

fn eq(&self, other: &Integer<E, I>) -> 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.
Source§

impl<E: Environment, I: IntegerType> PartialOrd for Integer<E, I>

Source§

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

Returns the lexicographic ordering of self and other.

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

impl<E: Environment, I: IntegerType, M: Magnitude> Pow<&Integer<E, M>> for Integer<E, I>

Source§

fn pow(self, other: &Integer<E, M>) -> Self::Output

Returns the power of self to the power of other.

Source§

type Output = Integer<E, I>

The result after applying the operator.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Pow<Integer<E, M>> for Integer<E, I>

Source§

fn pow(self, other: Integer<E, M>) -> Self::Output

Returns the power of self to the power of other.

Source§

type Output = Integer<E, I>

The result after applying the operator.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> PowWrapped<Integer<E, M>> for Integer<E, I>

Source§

fn pow_wrapped(&self, other: &Integer<E, M>) -> Self::Output

Returns the power of self to the power of other.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Rem<&Integer<E, I>> for Integer<E, I>

Source§

fn rem(self, other: &Integer<E, I>) -> Self

Returns the remainder of self divided by other.

Source§

type Output = Integer<E, I>

The resulting type after applying the % operator.
Source§

impl<E: Environment, I: IntegerType> Rem for Integer<E, I>

Source§

fn rem(self, other: Integer<E, I>) -> Self

Returns the remainder of self divided by other.

Source§

type Output = Integer<E, I>

The resulting type after applying the % operator.
Source§

impl<E: Environment, I: IntegerType> RemAssign<&Integer<E, I>> for Integer<E, I>

Source§

fn rem_assign(&mut self, other: &Integer<E, I>)

Returns the remainder of self divided by other.

Source§

impl<E: Environment, I: IntegerType> RemAssign for Integer<E, I>

Source§

fn rem_assign(&mut self, other: Integer<E, I>)

Returns the remainder of self divided by other.

Source§

impl<E: Environment, I: IntegerType> RemWrapped for Integer<E, I>

Source§

fn rem_wrapped(&self, other: &Integer<E, I>) -> Self::Output

Returns the remainder of self divided by other.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Serialize for Integer<E, I>

Source§

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

Serializes the integer into a string or as bytes.

Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Shl<&Integer<E, M>> for Integer<E, I>

Source§

fn shl(self, n: &Integer<E, M>) -> Self::Output

Shifts self to the left by n bits.

Source§

type Output = Integer<E, I>

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

impl<E: Environment, I: IntegerType, M: Magnitude> Shl<Integer<E, M>> for Integer<E, I>

Source§

fn shl(self, n: Integer<E, M>) -> Self::Output

Shifts self to the left by n bits.

Source§

type Output = Integer<E, I>

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

impl<E: Environment, I: IntegerType, M: Magnitude> ShlAssign<Integer<E, M>> for Integer<E, I>

Source§

fn shl_assign(&mut self, n: Integer<E, M>)

Shifts self to the left by n bits and assigns the result to self.

Source§

impl<E: Environment, I: IntegerType, M: Magnitude> ShlChecked<Integer<E, M>> for Integer<E, I>

Source§

fn shl_checked(&self, n: &Integer<E, M>) -> Self::Output

Shifts self to the left by n bits.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType, M: Magnitude> ShlWrapped<Integer<E, M>> for Integer<E, I>

Source§

fn shl_wrapped(&self, n: &Integer<E, M>) -> Self::Output

Shifts self to the left by n bits, continuing past the boundary.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Shr<&Integer<E, M>> for Integer<E, I>

Source§

fn shr(self, n: &Integer<E, M>) -> Self::Output

Shifts self to the right by n bits.

Source§

type Output = Integer<E, I>

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

impl<E: Environment, I: IntegerType, M: Magnitude> Shr<Integer<E, M>> for Integer<E, I>

Source§

fn shr(self, n: Integer<E, M>) -> Self::Output

Shifts self to the right by n bits.

Source§

type Output = Integer<E, I>

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

impl<E: Environment, I: IntegerType, M: Magnitude> ShrAssign<Integer<E, M>> for Integer<E, I>

Source§

fn shr_assign(&mut self, n: Integer<E, M>)

Shifts self to the right by n bits and assigns the result to self.

Source§

impl<E: Environment, I: IntegerType, M: Magnitude> ShrChecked<Integer<E, M>> for Integer<E, I>

Source§

fn shr_checked(&self, n: &Integer<E, M>) -> Self::Output

Shifts self to the right by n bits.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType, M: Magnitude> ShrWrapped<Integer<E, M>> for Integer<E, I>

Source§

fn shr_wrapped(&self, n: &Integer<E, M>) -> Self::Output

Shifts self to the right by n bits, continuing past the boundary.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> SizeInBits for Integer<E, I>

Source§

fn size_in_bits() -> usize

Returns the integer size in bits.

Source§

impl<E: Environment, I: IntegerType> SizeInBytes for Integer<E, I>

Source§

fn size_in_bytes() -> usize

Returns the integer size in bytes.

Source§

impl<E: Environment, I: IntegerType> Square for Integer<E, I>

Source§

fn square(&self) -> Self::Output

Returns the square of self.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Sub<&Integer<E, I>> for Integer<E, I>

Source§

fn sub(self, other: &Integer<E, I>) -> Self::Output

Returns the difference of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

impl<E: Environment, I: IntegerType> Sub for Integer<E, I>

Source§

fn sub(self, other: Integer<E, I>) -> Self::Output

Returns the difference of self and other.

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

impl<E: Environment, I: IntegerType> SubAssign<&Integer<E, I>> for Integer<E, I>

Source§

fn sub_assign(&mut self, other: &Integer<E, I>)

Subtracts other from self.

Source§

impl<E: Environment, I: IntegerType> SubAssign for Integer<E, I>

Source§

fn sub_assign(&mut self, other: Integer<E, I>)

Subtracts other from self.

Source§

impl<E: Environment, I: IntegerType> SubWrapped for Integer<E, I>

Source§

fn sub_wrapped(&self, other: &Integer<E, I>) -> Self::Output

Returns the difference of self and other.

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> Ternary for Integer<E, I>

Source§

fn ternary( condition: &Self::Boolean, first: &Self, second: &Self, ) -> Self::Output

Returns first if condition is true, otherwise returns second.

Source§

type Boolean = Boolean<E>

Source§

type Output = Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> ToBits for Integer<E, I>

Source§

fn write_bits_le(&self, vec: &mut Vec<bool>)

Outputs the little-endian bit representation of self without trailing zeros.

Source§

fn write_bits_be(&self, vec: &mut Vec<bool>)

Outputs the big-endian bit representation of self without leading zeros.

Source§

fn to_bits_le(&self) -> Vec<bool>

Returns self as a boolean array in little-endian order.
Source§

fn to_bits_be(&self) -> Vec<bool>

Returns self as a boolean array in big-endian order.
Source§

fn num_bits() -> Option<usize>

An optional indication of how many bits an object can be represented with.
Source§

impl<E: Environment, I: IntegerType> ToBytes for Integer<E, I>

Source§

fn write_le<W: Write>(&self, writer: W) -> IoResult<()>

Writes the integer to a buffer.

Source§

fn to_bytes_le(&self) -> Result<Vec<u8>, Error>
where Self: Sized,

Returns self as a byte array in little-endian order.
Source§

impl<E: Environment, I: IntegerType> ToField for Integer<E, I>

Source§

fn to_field(&self) -> Result<Self::Field>

Converts an integer into a field element.

Source§

type Field = Field<E>

Source§

impl<E: Environment, I: IntegerType> ToFields for Integer<E, I>

Source§

fn to_fields(&self) -> Result<Vec<Self::Field>>

Returns the integer as field elements.

Source§

type Field = Field<E>

Source§

impl<E: Environment, I: IntegerType> TypeName for Integer<E, I>

Source§

fn type_name() -> &'static str

Returns the type name as a string.

Source§

impl<E: Environment, I: IntegerType> Visibility for Integer<E, I>

Source§

fn size_in_fields(&self) -> Result<u16>

Returns the number of field elements to encode self.

Source§

type Boolean = Boolean<E>

Source§

impl<E: Environment, I: IntegerType> Zero for Integer<E, I>

Source§

fn zero() -> Self

Returns the 0 element of the integer.

Source§

fn is_zero(&self) -> bool

Returns true if the element is zero.

Source§

fn set_zero(&mut self)

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

impl<E: Copy + Environment, I: Copy + IntegerType> Copy for Integer<E, I>

Source§

impl<E: Eq + Environment, I: Eq + IntegerType> Eq for Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> IntegerCore<I> for Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> IntegerTrait<I, Integer<E, u8>, Integer<E, u16>, Integer<E, u32>> for Integer<E, I>

Source§

impl<E: Environment, I: IntegerType> StructuralPartialEq for Integer<E, I>

Auto Trait Implementations§

§

impl<E, I> Freeze for Integer<E, I>
where I: Freeze,

§

impl<E, I> RefUnwindSafe for Integer<E, I>

§

impl<E, I> Send for Integer<E, I>

§

impl<E, I> Sync for Integer<E, I>

§

impl<E, I> Unpin for Integer<E, I>
where I: Unpin, E: Unpin,

§

impl<E, I> UnwindSafe for Integer<E, I>
where I: UnwindSafe, E: UnwindSafe,

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> 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<T> CloneToUninit for T
where T: Clone,

Source§

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

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

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<'de, T> DeserializeExt<'de> for T

Source§

fn take_from_value<D>( value: &mut Value, field: &str, ) -> Result<T, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Source§

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

Source§

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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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> ToSmolStr for T
where T: Display + ?Sized,

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

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> Uniform for T

Source§

fn rand<R>(rng: &mut R) -> T
where R: Rng + ?Sized,

Samples a random value from a uniform distribution.
Source§

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

Source§

fn vzip(self) -> V

Source§

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

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