pub trait FromBits {
    fn from_bits_le(bits: &[bool]) -> Result<Self, Error>;
    fn from_bits_be(bits: &[bool]) -> Result<Self, Error>;
}

Required Methods

Reads Self from a boolean array in little-endian order.

Reads Self from a boolean array in big-endian order.

Implementations on Foreign Types

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.

Initializes a new boolean by extracting the first bit from a list of length 1.

Initializes a new boolean by extracting the first bit from a list of length 1.

Initializes a new group by recovering the x-coordinate of an affine group from a list of little-endian bits.

Initializes a new group by recovering the x-coordinate of an affine group from a list of big-endian bits.

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

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

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

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

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

Implementors