Trait snarkvm_console_account::FromBits
pub trait FromBits: Sized {
// Required methods
fn from_bits_le(bits: &[bool]) -> Result<Self, Error>;
fn from_bits_be(bits: &[bool]) -> Result<Self, Error>;
}
Required Methods§
fn from_bits_le(bits: &[bool]) -> Result<Self, Error>
fn from_bits_le(bits: &[bool]) -> Result<Self, Error>
Reads Self
from a boolean array in little-endian order.
fn from_bits_be(bits: &[bool]) -> Result<Self, Error>
fn from_bits_be(bits: &[bool]) -> Result<Self, Error>
Reads Self
from a boolean array in big-endian order.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
§impl<E> FromBits for Boolean<E>where
E: Environment,
impl<E> FromBits for Boolean<E>where
E: Environment,
§fn from_bits_le(bits_le: &[bool]) -> Result<Boolean<E>, Error>
fn from_bits_le(bits_le: &[bool]) -> Result<Boolean<E>, Error>
Initializes a new boolean by extracting the first bit from a list of length 1.
§fn from_bits_be(bits_be: &[bool]) -> Result<Boolean<E>, Error>
fn from_bits_be(bits_be: &[bool]) -> Result<Boolean<E>, Error>
Initializes a new boolean by extracting the first bit from a list of length 1.
§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: &[bool]) -> Result<Integer<E, I>, Error>
fn from_bits_le(bits_le: &[bool]) -> Result<Integer<E, I>, Error>
Initializes a new integer from a list of little-endian bits.
§fn from_bits_be(bits_be: &[bool]) -> Result<Integer<E, I>, Error>
fn from_bits_be(bits_be: &[bool]) -> Result<Integer<E, I>, Error>
Initializes a new integer from a list of big-endian bits.