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

Casts an integer into a scalar.

Source§

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

Source

pub fn size_in_bits() -> u16

Source

pub fn cast_as_dual(self) -> Integer<E, I::Dual>

Trait Implementations§

Source§

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

Source§

type Output = Integer<E, I>

Source§

fn abs_checked(self) -> Self::Output

Source§

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

Source§

type Output = Integer<E, I>

Source§

fn abs_checked(self) -> Self::Output

Source§

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

Source§

type Output = Integer<E, I>

Source§

fn abs_wrapped(self) -> Self::Output

Source§

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

Source§

type Output = Integer<E, I>

Source§

fn abs_wrapped(self) -> Self::Output

Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

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

Performs the += operation. Read more
Source§

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

Source§

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

Performs the += operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

Source§

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

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 (self AND other).

Source§

type Output = Integer<E, I>

The resulting type after applying the & operator.
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 (self AND other).

Source§

type Output = Integer<E, I>

The resulting type after applying the & operator.
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 (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: Integer<E, I>) -> Self::Output

Returns (self AND other).

Source§

type Output = Integer<E, I>

The resulting type after applying the & operator.
Source§

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

Source§

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

Sets self as (self AND other).

Source§

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

Source§

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

Sets self as (self AND other).

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 (self OR other).

Source§

type Output = Integer<E, I>

The resulting type after applying the | operator.
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 (self OR other).

Source§

type Output = Integer<E, I>

The resulting type after applying the | operator.
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 (self OR 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: Integer<E, I>) -> Self::Output

Returns (self OR other).

Source§

type Output = Integer<E, I>

The resulting type after applying the | operator.
Source§

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

Source§

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

Sets self as (self OR other).

Source§

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

Source§

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

Sets self as (self OR other).

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 (self != other).

Source§

type Output = Integer<E, I>

The resulting type after applying the ^ operator.
Source§

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

Source§

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

Returns (self != other).

Source§

type Output = Integer<E, I>

The resulting type after applying the ^ operator.
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 (self != 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 (self != other).

Source§

type Output = Integer<E, I>

The resulting type after applying the ^ operator.
Source§

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

Source§

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

Sets self as (self != other).

Source§

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

Source§

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

Sets self as (self != other).

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> 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> Div<&Integer<E, I>> for &Integer<E, I>

Source§

type Output = Integer<E, I>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

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

Source§

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

Performs the /= operation. Read more
Source§

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

Source§

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

Performs the /= operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

fn eject_mode(&self) -> Mode

Ejects the mode of the integer.

Source§

fn eject_value(&self) -> Self::Primitive

Ejects the integer circuit as a console integer value.

Source§

type Primitive = Integer<<E as Environment>::Network, I>

Source§

fn eject(&self) -> (Mode, Self::Primitive)

Ejects the mode and primitive value of the circuit type.
Source§

fn is_constant(&self) -> bool

Returns true if the circuit is a constant.
Source§

fn is_public(&self) -> bool

Returns true if the circuit is a public.
Source§

fn is_private(&self) -> bool

Returns true if the circuit is a private.
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.

This method constructs a boolean that indicates if self and other are not equal to each other.

Source§

type Output = Boolean<E>

Source§

impl<E: Environment, I: IntegerType> From<&Integer<E, I>> for LinearCombination<E::BaseField>

Source§

fn from(integer: &Integer<E, I>) -> Self

Converts to this type from the input type.
Source§

impl<E: Environment, I: IntegerType> From<Integer<E, I>> for LinearCombination<E::BaseField>

Source§

fn from(integer: Integer<E, I>) -> Self

Converts to this type from the input type.
Source§

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

Source§

fn from_bits_le(bits_le: &[Self::Boolean]) -> Self

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

Source§

fn from_bits_be(bits_be: &[Self::Boolean]) -> Self

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

Source§

type Boolean = Boolean<E>

Source§

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

Source§

fn from_field(field: Self::Field) -> 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> FromStr for Integer<E, I>

Source§

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

Parses a string into an integer circuit.

Source§

type Err = Error

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

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

Source§

fn new(mode: Mode, value: Self::Primitive) -> Self

Initializes a new integer.

Source§

type Primitive = Integer<<E as Environment>::Network, I>

Source§

fn constant(value: Self::Primitive) -> Self
where Self: Sized,

Initializes a constant of the given primitive value.
Source§

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

Source§

fn msb(&self) -> &Self::Boolean

Returns the MSB of the integer.

Source§

type Boolean = Boolean<E>

Source§

impl<E: Environment, I: IntegerType> Metrics<dyn AbsChecked<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn AbsWrapped<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Add<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn AddChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn AddWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn BitAnd<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn BitOr<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn BitXor<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Compare<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Div<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn DivChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn DivWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Mul<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn MulChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn MulWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, bool, bool)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Neg<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Not<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn count(_case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn One<Boolean = Boolean<E>>> for Integer<E, I>

Source§

type Case = ()

Source§

fn count(_case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Metrics<dyn PowChecked<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, bool, bool)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Metrics<dyn PowWrapped<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, bool, bool)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Rem<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn RemChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn RemWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Shl<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Metrics<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, bool, bool)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Metrics<dyn ShlWrapped<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, bool, bool)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Shr<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Metrics<dyn ShrChecked<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> Metrics<dyn ShrWrapped<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Sub<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn SubChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn SubWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, Mode)

Source§

fn count(case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E: Environment, I: IntegerType> Metrics<dyn Zero<Boolean = Boolean<E>>> for Integer<E, I>

Source§

type Case = ()

Source§

fn count(_case: &Self::Case) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

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

Source§

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

Performs the *= operation. Read more
Source§

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

Source§

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

Performs the *= operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

fn neg(self) -> Self::Output

Performs the unary - operation.

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

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

Source§

fn neg(self) -> Self::Output

Performs the unary - operation.

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§

type Output = Integer<E, I>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

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

Source§

type Boolean = Boolean<E>

Source§

fn one() -> Self

Returns a new one constant.
Source§

fn is_one(&self) -> Self::Boolean

Returns true if self is one.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn AbsChecked<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn AbsWrapped<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Add<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn AddChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn AddWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn BitAnd<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (CircuitType<Integer<E, I>>, CircuitType<Integer<E, I>>)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn BitOr<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (CircuitType<Integer<E, I>>, CircuitType<Integer<E, I>>)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn BitXor<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (CircuitType<Integer<E, I>>, CircuitType<Integer<E, I>>)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Compare<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Div<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn DivChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn DivWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Equal<Integer<E, I>, Output = Boolean<E>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Mul<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn MulChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn MulWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, bool, bool)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Neg<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Not<Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = Mode

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn One<Boolean = Boolean<E>>> for Integer<E, I>

Source§

type Case = ()

Source§

fn output_mode(_case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> OutputMode<dyn PowChecked<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, CircuitType<Integer<E, M>>)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> OutputMode<dyn PowWrapped<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, CircuitType<Integer<E, M>>)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Rem<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn RemChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn RemWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Shl<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> OutputMode<dyn ShlChecked<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> OutputMode<dyn ShlWrapped<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode, bool, bool)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Shr<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> OutputMode<dyn ShrChecked<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType, M: Magnitude> OutputMode<dyn ShrWrapped<Integer<E, M>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Sub<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn SubChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn SubWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Ternary<Boolean = Boolean<E>, Output = Integer<E, I>>> for Integer<E, I>

Source§

type Case = (CircuitType<Boolean<E>>, Mode, Mode)

Source§

fn output_mode(case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

impl<E: Environment, I: IntegerType> OutputMode<dyn Zero<Boolean = Boolean<E>>> for Integer<E, I>

Source§

type Case = ()

Source§

fn output_mode(_case: &Self::Case) -> Mode

Returns the mode of the output.
Source§

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

Source§

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

Parses a string into an integer circuit.

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> PowChecked<Integer<E, M>> for Integer<E, I>

Source§

fn pow_checked(&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, M: Magnitude> PowWrapped<Integer<E, M>> for Integer<E, I>

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

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

Source§

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

Performs the %= operation. Read more
Source§

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

Source§

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

Performs the %= operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the << operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the << operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the << operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the << operation. Read more
Source§

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

Source§

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

Performs the <<= operation. Read more
Source§

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

Source§

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

Performs the <<= operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the >> operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the >> operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the >> operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

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

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

Performs the >> operation. Read more
Source§

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

Source§

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

Performs the >>= operation. Read more
Source§

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

Source§

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

Performs the >>= operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

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

Performs the -= operation. Read more
Source§

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

Source§

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

Performs the -= operation. Read more
Source§

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

Source§

type Output = Integer<E, I>

Source§

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

Source§

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

Source§

type Output = Integer<E, I>

Source§

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

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<Self::Boolean>)

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

Source§

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

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

Source§

type Boolean = Boolean<E>

Source§

fn to_bits_le(&self) -> Vec<Self::Boolean>

Returns the little-endian bits of the circuit.
Source§

fn to_bits_be(&self) -> Vec<Self::Boolean>

Returns the big-endian bits of the circuit.
Source§

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

Source§

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

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

Source§

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

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

Source§

type Boolean = Boolean<E>

Source§

fn to_bits_le(&self) -> Vec<Self::Boolean>

Returns the little-endian bits of the circuit.
Source§

fn to_bits_be(&self) -> Vec<Self::Boolean>

Returns the big-endian bits of the circuit.
Source§

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

Source§

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

Casts an integer into a base field.

Source§

type Field = Field<E>

Source§

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

Source§

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

Casts an integer into a list of base fields.

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 of the circuit as a string.

Source§

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

Source§

type Boolean = Boolean<E>

Source§

fn zero() -> Self

Returns a new zero constant.
Source§

fn is_zero(&self) -> Self::Boolean

Returns true if self is zero.
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>

Auto Trait Implementations§

§

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

§

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 as Environment>::BaseField: Unpin,

§

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

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

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

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