Struct snarkvm_circuit::Field

pub struct Field<E>where
    E: Environment,{ /* private fields */ }

Trait Implementations§

§

impl<E> Add<&Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the + operator.
§

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

Performs the + operation. Read more
§

impl<E> Add<&Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the + operator.
§

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

Performs the + operation. Read more
§

impl<E> Add<Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the + operator.
§

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

Performs the + operation. Read more
§

impl<E> Add<Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the + operator.
§

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

Performs the + operation. Read more
§

impl<E> AddAssign<&Field<E>> for Field<E>where E: Environment,

§

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

Performs the += operation. Read more
§

impl<E> AddAssign<Field<E>> for Field<E>where E: Environment,

§

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

Performs the += operation. Read more
§

impl<E> Clone for Field<E>where E: Clone + Environment, <E as Environment>::BaseField: Clone,

§

fn clone(&self) -> Field<E>

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
§

impl<E> Compare<Field<E>> for Field<E>where E: Environment,

§

fn is_less_than( &self, other: &Field<E> ) -> <Field<E> as Compare<Field<E>>>::Output

Returns true if self is less than other.

§

fn is_greater_than( &self, other: &Field<E> ) -> <Field<E> as Compare<Field<E>>>::Output

Returns true if self is greater than other.

§

fn is_less_than_or_equal( &self, other: &Field<E> ) -> <Field<E> as Compare<Field<E>>>::Output

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

§

fn is_greater_than_or_equal( &self, other: &Field<E> ) -> <Field<E> as Compare<Field<E>>>::Output

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

§

type Output = Boolean<E>

§

impl<E> Debug for Field<E>where E: Environment,

§

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

Formats the value using the given formatter. Read more
§

impl<E> Display for Field<E>where E: Environment,

§

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

Formats the value using the given formatter. Read more
§

impl<E> Div<&Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the / operator.
§

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

Performs the / operation. Read more
§

impl<E> Div<&Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the / operator.
§

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

Performs the / operation. Read more
§

impl<E> Div<Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the / operator.
§

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

Performs the / operation. Read more
§

impl<E> Div<Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the / operator.
§

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

Performs the / operation. Read more
§

impl<E> DivAssign<&Field<E>> for Field<E>where E: Environment,

§

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

Performs the /= operation. Read more
§

impl<E> DivAssign<Field<E>> for Field<E>where E: Environment,

§

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

Performs the /= operation. Read more
§

impl<E> DivUnchecked<Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

§

fn div_unchecked(&self, rhs: &Rhs) -> Self::Output

§

impl<E> Double for Field<E>where E: Environment,

§

type Output = Field<E>

§

fn double(&self) -> <Field<E> as Double>::Output

§

impl<E> Eject for Field<E>where E: Environment,

§

fn eject_mode(&self) -> Mode

Ejects the mode of the field circuit.

§

fn eject_value(&self) -> <Field<E> as Eject>::Primitive

Ejects the field circuit as a console field.

§

type Primitive = Field<<E as Environment>::Network>

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

impl<E> Equal<Field<E>> for Field<E>where E: Environment,

§

fn is_equal(&self, other: &Field<E>) -> <Field<E> as Equal<Field<E>>>::Output

Returns true if self and other are equal.

This method costs 3 constraints.

§

fn is_not_equal( &self, other: &Field<E> ) -> <Field<E> as Equal<Field<E>>>::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.

This method costs 3 constraints.

§

type Output = Boolean<E>

§

impl<E> From<&Address<E>> for Field<E>where E: Environment,

§

fn from(value: &Address<E>) -> Field<E>

Returns the x-coordinate of the affine group element in the address.

§

impl<E> From<&Field<E>> for Address<E>where E: Environment,

§

fn from(value: &Field<E>) -> Address<E>

Initializes an address from the x-coordinate of an affine group element.

§

impl<E> From<&Field<E>> for LinearCombination<<E as Environment>::BaseField>where E: Environment,

§

fn from(field: &Field<E>) -> LinearCombination<<E as Environment>::BaseField>

Converts to this type from the input type.
§

impl<E> From<&LinearCombination<<E as Environment>::BaseField>> for Field<E>where E: Environment,

§

fn from( linear_combination: &LinearCombination<<E as Environment>::BaseField> ) -> Field<E>

Converts to this type from the input type.
§

impl<E> From<Address<E>> for Field<E>where E: Environment,

§

fn from(value: Address<E>) -> Field<E>

Returns the x-coordinate of the affine group element in the address.

§

impl<E> From<Field<E>> for Address<E>where E: Environment,

§

fn from(value: Field<E>) -> Address<E>

Initializes an address from the x-coordinate of an affine group element.

§

impl<E> From<Field<E>> for LinearCombination<<E as Environment>::BaseField>where E: Environment,

§

fn from(field: Field<E>) -> LinearCombination<<E as Environment>::BaseField>

Converts to this type from the input type.
§

impl<E> From<LinearCombination<<E as Environment>::BaseField>> for Field<E>where E: Environment,

§

fn from( linear_combination: LinearCombination<<E as Environment>::BaseField> ) -> Field<E>

Converts to this type from the input type.
§

impl<E> FromBits for Field<E>where E: Environment,

§

fn from_bits_le(bits_le: &[<Field<E> as FromBits>::Boolean]) -> Field<E>

Initializes a new base field element from a list of little-endian bits.

  • If bits_le is longer than E::BaseField::size_in_bits(), the excess bits are enforced to be 0s.
  • If bits_le is shorter than E::BaseField::size_in_bits(), it is padded with 0s up to base field size.
§

fn from_bits_be(bits_be: &[<Field<E> as FromBits>::Boolean]) -> Field<E>

Initializes a new base field element from a list of big-endian bits without leading zeros.

§

type Boolean = Boolean<E>

§

impl<E> FromBoolean for Field<E>where E: Environment,

§

fn from_boolean(boolean: &<Field<E> as FromBoolean>::Boolean) -> Field<E>

Initializes a base field from a boolean.

§

type Boolean = Boolean<E>

§

impl<E> FromStr for Field<E>where E: Environment,

§

fn from_str(string: &str) -> Result<Field<E>, Error>

Parses a string into a field circuit.

§

type Err = Error

The associated error which can be returned from parsing.
§

impl<E> Inject for Field<E>where E: Environment,

§

fn new(mode: Mode, field: <Field<E> as Inject>::Primitive) -> Field<E>

Initializes a field circuit from a console field.

§

type Primitive = Field<<E as Environment>::Network>

source§

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

Initializes a constant of the given primitive value.
§

impl<E> Inv for &Field<E>where E: Environment,

§

type Output = Field<E>

The result after applying the operator.
§

fn inv(self) -> <&Field<E> as Inv>::Output

Returns the multiplicative inverse of self. Read more
§

impl<E> Inv for Field<E>where E: Environment,

§

type Output = Field<E>

The result after applying the operator.
§

fn inv(self) -> <Field<E> as Inv>::Output

Returns the multiplicative inverse of self. Read more
§

impl<E> Inverse for Field<E>where E: Environment,

§

type Output = Field<E>

§

fn inverse(&self) -> <Field<E> as Inverse>::Output

§

impl<E> Metrics<dyn Add<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

§

fn count( _case: &<Field<E> as Metrics<dyn Add<Field<E>, Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Div<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

§

fn count( case: &<Field<E> as Metrics<dyn Div<Field<E>, Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn DivUnchecked<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

§

fn count( case: &<Field<E> as Metrics<dyn DivUnchecked<Field<E>, Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Double<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn count( _parameter: &<Field<E> as Metrics<dyn Double<Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Equal<Field<E>, Output = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

§

fn count( case: &<Field<E> as Metrics<dyn Equal<Field<E>, Output = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn FromBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Vec<Mode, Global>

§

fn count( _modes: &<Field<E> as Metrics<dyn FromBits<Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn FromBoolean<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = ()

§

fn count( _case: &<Field<E> as Metrics<dyn FromBoolean<Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Inverse<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn count( case: &<Field<E> as Metrics<dyn Inverse<Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Mul<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

§

fn count( case: &<Field<E> as Metrics<dyn Mul<Field<E>, Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Neg<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn count( _case: &<Field<E> as Metrics<dyn Neg<Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn One<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = ()

§

fn count( _parameter: &<Field<E> as Metrics<dyn One<Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Pow<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (CircuitType<Field<E>>, CircuitType<Field<E>>)

§

fn count( case: &<Field<E> as Metrics<dyn Pow<Field<E>, Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Square<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn count( case: &<Field<E> as Metrics<dyn Square<Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn SquareRoot<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn count( case: &<Field<E> as Metrics<dyn SquareRoot<Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Sub<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

§

fn count( _case: &<Field<E> as Metrics<dyn Sub<Field<E>, Output = Field<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode, Mode)

§

fn count( case: &<Field<E> as Metrics<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn ToBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn count( case: &<Field<E> as Metrics<dyn ToBits<Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn ToLowerBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, u64)

§

fn count( case: &<Field<E> as Metrics<dyn ToLowerBits<Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn ToUpperBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, u64)

§

fn count( case: &<Field<E> as Metrics<dyn ToUpperBits<Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Metrics<dyn Zero<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = ()

§

fn count( _parameter: &<Field<E> as Metrics<dyn Zero<Boolean = Boolean<E>>>>::Case ) -> Count

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

impl<E> Mul<&Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the * operator.
§

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

Performs the * operation. Read more
§

impl<E> Mul<&Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the * operator.
§

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

Performs the * operation. Read more
§

impl<E> Mul<Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the * operator.
§

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

Performs the * operation. Read more
§

impl<E> Mul<Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the * operator.
§

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

Performs the * operation. Read more
§

impl<E> MulAssign<&Field<E>> for Field<E>where E: Environment,

§

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

Performs the *= operation. Read more
§

impl<E> MulAssign<Field<E>> for Field<E>where E: Environment,

§

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

Performs the *= operation. Read more
§

impl<E> Neg for &Field<E>where E: Environment,

§

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

Performs the unary - operation.

§

type Output = Field<E>

The resulting type after applying the - operator.
§

impl<E> Neg for Field<E>where E: Environment,

§

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

Performs the unary - operation.

§

type Output = Field<E>

The resulting type after applying the - operator.
§

impl<E> One for Field<E>where E: Environment,

§

type Boolean = Boolean<E>

§

fn one() -> Field<E>

Returns a new one constant.
§

fn is_one(&self) -> <Field<E> as One>::Boolean

Returns true if self is one.
§

impl<E> OutputMode<dyn Add<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (CircuitType<Field<E>>, CircuitType<Field<E>>)

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Add<Field<E>, Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Div<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (CircuitType<Field<E>>, CircuitType<Field<E>>)

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Div<Field<E>, Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn DivUnchecked<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (CircuitType<Field<E>>, CircuitType<Field<E>>)

§

fn output_mode( case: &<Field<E> as OutputMode<dyn DivUnchecked<Field<E>, Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Double<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( input: &<Field<E> as OutputMode<dyn Double<Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Equal<Field<E>, Output = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = (Mode, Mode)

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Equal<Field<E>, Output = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn FromBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Vec<Mode, Global>

§

fn output_mode( case: &<Field<E> as OutputMode<dyn FromBits<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn FromBoolean<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( case: &<Field<E> as OutputMode<dyn FromBoolean<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Inverse<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Inverse<Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Mul<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (CircuitType<Field<E>>, CircuitType<Field<E>>)

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Mul<Field<E>, Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Neg<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Neg<Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn One<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = ()

§

fn output_mode( _input: &<Field<E> as OutputMode<dyn One<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Pow<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (CircuitType<Field<E>>, CircuitType<Field<E>>)

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Pow<Field<E>, Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Square<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( input: &<Field<E> as OutputMode<dyn Square<Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn SquareRoot<Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( case: &<Field<E> as OutputMode<dyn SquareRoot<Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Sub<Field<E>, Output = Field<E>>> for Field<E>where E: Environment,

§

type Case = (CircuitType<Field<E>>, CircuitType<Field<E>>)

§

fn output_mode( case: &<Field<E> as OutputMode<dyn Sub<Field<E>, Output = Field<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

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

§

fn output_mode( parameter: &<Field<E> as OutputMode<dyn Ternary<Output = Field<E>, Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn ToBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( case: &<Field<E> as OutputMode<dyn ToBits<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn ToLowerBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( case: &<Field<E> as OutputMode<dyn ToLowerBits<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn ToUpperBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Mode

§

fn output_mode( case: &<Field<E> as OutputMode<dyn ToUpperBits<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> OutputMode<dyn Zero<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = ()

§

fn output_mode( _input: &<Field<E> as OutputMode<dyn Zero<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.
§

impl<E> Parser for Field<E>where E: Environment,

§

fn parse(string: &str) -> Result<(&str, Field<E>), Err<VerboseError<&str>>>

Parses a string into a field circuit.

§

impl<E> Pow<&Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The result after applying the operator.
§

fn pow(self, exponent: &Field<E>) -> <&Field<E> as Pow<&Field<E>>>::Output

Returns self to the power rhs. Read more
§

impl<E> Pow<&Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The result after applying the operator.
§

fn pow(self, exponent: &Field<E>) -> <Field<E> as Pow<&Field<E>>>::Output

Returns self to the power rhs. Read more
§

impl<E> Pow<Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The result after applying the operator.
§

fn pow(self, exponent: Field<E>) -> <&Field<E> as Pow<Field<E>>>::Output

Returns self to the power rhs. Read more
§

impl<E> Pow<Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The result after applying the operator.
§

fn pow(self, exponent: Field<E>) -> <Field<E> as Pow<Field<E>>>::Output

Returns self to the power rhs. Read more
§

impl<E> Square for Field<E>where E: Environment,

§

type Output = Field<E>

§

fn square(&self) -> <Field<E> as Square>::Output

§

impl<E> SquareRoot for Field<E>where E: Environment,

§

type Output = Field<E>

§

fn square_root(&self) -> <Field<E> as SquareRoot>::Output

§

impl<E> Sub<&Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the - operator.
§

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

Performs the - operation. Read more
§

impl<E> Sub<&Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the - operator.
§

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

Performs the - operation. Read more
§

impl<E> Sub<Field<E>> for &Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the - operator.
§

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

Performs the - operation. Read more
§

impl<E> Sub<Field<E>> for Field<E>where E: Environment,

§

type Output = Field<E>

The resulting type after applying the - operator.
§

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

Performs the - operation. Read more
§

impl<E> SubAssign<&Field<E>> for Field<E>where E: Environment,

§

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

Performs the -= operation. Read more
§

impl<E> SubAssign<Field<E>> for Field<E>where E: Environment,

§

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

Performs the -= operation. Read more
§

impl<E> Ternary for Field<E>where E: Environment,

§

fn ternary( condition: &<Field<E> as Ternary>::Boolean, first: &Field<E>, second: &Field<E> ) -> <Field<E> as Ternary>::Output

Returns first if condition is true, otherwise returns second.

§

type Boolean = Boolean<E>

§

type Output = Field<E>

§

impl<E> ToBits for &Field<E>where E: Environment,

§

fn to_bits_le(&self) -> Vec<<&Field<E> as ToBits>::Boolean, Global>

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

§

fn to_bits_be(&self) -> Vec<<&Field<E> as ToBits>::Boolean, Global>

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

§

type Boolean = Boolean<E>

§

impl<E> ToBits for Field<E>where E: Environment,

§

fn to_bits_le(&self) -> Vec<<Field<E> as ToBits>::Boolean, Global>

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

§

fn to_bits_be(&self) -> Vec<<Field<E> as ToBits>::Boolean, Global>

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

§

type Boolean = Boolean<E>

§

impl<E> ToLowerBits for Field<E>where E: Environment,

§

fn to_lower_bits_le( &self, k: usize ) -> Vec<<Field<E> as ToLowerBits>::Boolean, Global>

Outputs the lower k bits of an n-bit field element in little-endian representation. Enforces that the upper n - k bits are zero.

§

fn to_lower_bits_be( &self, k: usize ) -> Vec<<Field<E> as ToLowerBits>::Boolean, Global>

Outputs the lower k bits of an n-bit field element in big-endian representation. Enforces that the upper n - k bits are zero.

§

type Boolean = Boolean<E>

§

impl<E> ToUpperBits for Field<E>where E: Environment,

§

fn to_upper_bits_le( &self, k: usize ) -> Vec<<Field<E> as ToUpperBits>::Boolean, Global>

Outputs the upper k bits of an n-bit field element in little-endian representation. Enforces that the lower n - k bits are zero.

§

fn to_upper_bits_be( &self, k: usize ) -> Vec<<Field<E> as ToUpperBits>::Boolean, Global>

Outputs the upper k bits of an n-bit field element in big-endian representation. Enforces that the lower n - k bits are zero.

§

type Boolean = Boolean<E>

§

impl<E> TypeName for Field<E>where E: Environment,

§

fn type_name() -> &'static str

Returns the type name of the circuit as a string.

§

impl<E> Zero for Field<E>where E: Environment,

§

type Boolean = Boolean<E>

§

fn zero() -> Field<E>

Returns a new zero constant.
§

fn is_zero(&self) -> <Field<E> as Zero>::Boolean

Returns true if self is zero.
§

impl<E> FieldTrait for Field<E>where E: Environment,

Auto Trait Implementations§

§

impl<E> RefUnwindSafe for Field<E>where <E as Environment>::BaseField: UnwindSafe + RefUnwindSafe,

§

impl<E> !Send for Field<E>

§

impl<E> !Sync for Field<E>

§

impl<E> Unpin for Field<E>where <E as Environment>::BaseField: Unpin,

§

impl<E> UnwindSafe for Field<E>where <E as Environment>::BaseField: UnwindSafe + RefUnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

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

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

impl<T> ToString for Twhere 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 Twhere U: Into<T>,

§

type Error = Infallible

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

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

Performs the conversion.
source§

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

§

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

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

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

Performs the conversion.
§

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

§

fn vzip(self) -> V