snarkvm_console_account

Trait FromBits

Source
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§

Source

fn from_bits_le(bits: &[bool]) -> Result<Self, Error>

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

Source

fn from_bits_be(bits: &[bool]) -> Result<Self, Error>

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<E> FromBits for Boolean<E>
where E: Environment,

Source§

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.

Source§

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.

Source§

impl<E, I> FromBits for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

fn from_bits_le(bits_le: &[bool]) -> Result<Integer<E, I>, Error>

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

Source§

fn from_bits_be(bits_be: &[bool]) -> Result<Integer<E, I>, Error>

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

Implementors§

Source§

impl<E> FromBits for Address<E>
where E: Environment,

Source§

impl<E> FromBits for Field<E>
where E: Environment,

Source§

impl<E> FromBits for Group<E>
where E: Environment,

Source§

impl<E> FromBits for Scalar<E>
where E: Environment,

Source§

impl<N: Network> FromBits for ComputeKey<N>

Source§

impl<N: Network> FromBits for Signature<N>