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

Implementations

The field size in bits.

The field size in bytes.

The field capacity for data bits.

Initializes a new field.

Initializes a new field as a domain separator.

Initializes a new field from a u8.

Initializes a new field from a u16.

Initializes a new field from a u32.

Initializes a new field from a u64.

Initializes a new field from a u128.

Returns 1 * 2^{-1}.

Trait Implementations

Returns the sum of self and other.

The resulting type after applying the + operator.

Returns the sum of self and other.

The resulting type after applying the + operator.

Adds other to self.

Adds other to self.

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

The resulting type after dereferencing.

Dereferences the value.

Deserializes the field from a string or bytes.

Formats the value using the given formatter. Read more

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

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

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

Returns the quotient of self and other.

The resulting type after applying the / operator.

Returns the quotient of self and other.

The resulting type after applying the / operator.

Divides self by other.

Divides self by other.

Returns the double of self.

Returns true if self and other are equal.

Returns true if self and other are not equal.

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

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

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

Reads the field from a buffer.

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

Parses a string into a field.

The associated error which can be returned from parsing.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Returns the inverse of self.

Returns the product of self and other.

The resulting type after applying the * operator.

Returns the product of self and other.

The resulting type after applying the * operator.

Multiplies self by other.

Multiplies self by other.

Returns the negation of self.

The resulting type after applying the - operator.

Returns the 1 element of the field.

Returns true if the element is one.

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

Returns the lexicographic ordering of self and other.

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

Parses a string into a field circuit.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Returns the lexicographic ordering of self and other.

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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

Returns the power of self to the power of other.

The result after applying the operator.

Returns the power of self to the power of other.

The result after applying the operator.

Returns the product of self and other.

Returns the product of self and other.

Serializes the field into a string or as bytes.

Returns the field size in bits.

Returns the field size in bytes.

Returns the field capacity for data bits.

Returns the square of self.

Returns the square_root of self.

Returns the difference of self and other.

The resulting type after applying the - operator.

Returns the difference of self and other.

The resulting type after applying the - operator.

Subtracts other from self.

Subtracts other from self.

Returns the sum of self and other.

Returns the sum of self and other.

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.

Writes the field to a buffer.

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

Returns the type name as a string.

Returns the 0 element of the field.

Returns true if the element is zero.

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

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

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.

Samples a random value from a uniform distribution.