Trait snarkvm_circuit_types::prelude::from::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§
Implementations on Foreign Types§
source§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,
source§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.
source§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.