Trait snarkvm_circuit::prelude::FromBits
source · pub trait FromBits {
type Boolean: BooleanTrait;
// Required methods
fn from_bits_le(bits_le: &[Self::Boolean]) -> Self
where Self: Sized;
fn from_bits_be(bits_be: &[Self::Boolean]) -> Self
where Self: Sized;
}
Expand description
Unary operator for instantiating from bits.
Required Associated Types§
type Boolean: BooleanTrait
Required Methods§
fn from_bits_le(bits_le: &[Self::Boolean]) -> Selfwhere Self: Sized,
fn from_bits_be(bits_be: &[Self::Boolean]) -> Selfwhere Self: Sized,
Trait Implementations§
§impl<E> OutputMode<dyn FromBits<Boolean = Boolean<E>>> for Field<E>where
E: Environment,
impl<E> OutputMode<dyn FromBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,
Implementations on Foreign Types§
§impl<E, I> FromBits for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> FromBits for Integer<E, I>where E: Environment, I: IntegerType,
§fn from_bits_le(
bits_le: &[<Integer<E, I> as FromBits>::Boolean]
) -> Integer<E, I>
fn from_bits_le( bits_le: &[<Integer<E, I> as FromBits>::Boolean] ) -> Integer<E, I>
Initializes a new integer from a list of little-endian bits with trailing zeros.
§fn from_bits_be(
bits_be: &[<Integer<E, I> as FromBits>::Boolean]
) -> Integer<E, I>
fn from_bits_be( bits_be: &[<Integer<E, I> as FromBits>::Boolean] ) -> Integer<E, I>
Initializes a new integer from a list of big-endian bits with leading zeros.