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§

Required Methods§

source

fn from_bits_le(bits_le: &[Self::Boolean]) -> Selfwhere Self: Sized,

source

fn from_bits_be(bits_be: &[Self::Boolean]) -> Selfwhere Self: Sized,

Trait Implementations§

source§

impl<E> Metrics<dyn FromBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Vec<Mode, Global>

source§

fn count( _modes: &<Field<E> as Metrics<dyn FromBits<Boolean = Boolean<E>>>>::Case ) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
source§

impl<E> OutputMode<dyn FromBits<Boolean = Boolean<E>>> for Field<E>where E: Environment,

§

type Case = Vec<Mode, Global>

source§

fn output_mode( case: &<Field<E> as OutputMode<dyn FromBits<Boolean = Boolean<E>>>>::Case ) -> Mode

Returns the mode of the output.

Implementations on Foreign Types§

source§

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>

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>

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

§

type Boolean = Boolean<E>

Implementors§

source§

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

§

type Boolean = Boolean<E>

source§

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

§

type Boolean = Boolean<E>

source§

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

§

type Boolean = Boolean<E>

source§

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

§

type Boolean = Boolean<E>

source§

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

§

type Boolean = Boolean<E>

source§

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

§

type Boolean = Boolean<E>