Struct snarkvm_circuit::Scalar

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

Trait Implementations

The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Returns true if self is less than other.

Returns true if self is greater than other.

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

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

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

Ejects the mode of the scalar.

Ejects the scalar circuit as a console scalar.

Ejects the mode and primitive value of the circuit type. Read more
Returns true if the circuit is a constant. Read more
Returns true if the circuit is a public. Read more
Returns true if the circuit is a private. Read more

Returns true if self and other are equal.

Returns true if self and other are not equal.

Converts to this type from the input type.
Converts to this type from the input type.

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

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

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

Parses a string into a scalar circuit.

The associated error which can be returned from parsing.

Initializes a scalar circuit from a console scalar.

Initializes a constant of the given primitive value. Read more
Returns the number of constants, public inputs, private inputs, and constraints.
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Returns a new one constant.
Returns true if self is one.
Returns the mode of the output.

Parses a string into a scalar circuit.

Returns first if condition is true, otherwise returns second.

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

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

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

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

Casts a scalar field element into a base field element.

Casts a string into a list of base fields.

Returns the type name of the circuit as a string.

Returns a new zero constant.
Returns true if self is zero.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.