pub trait ToBits {
    type Boolean: BooleanTrait;

    // Required methods
    fn to_bits_le(&self) -> Vec<Self::Boolean, Global>;
    fn to_bits_be(&self) -> Vec<Self::Boolean, Global>;
}
Expand description

Unary operator for converting to bits.

Required Associated Types§

Required Methods§

source

fn to_bits_le(&self) -> Vec<Self::Boolean, Global>

Returns the little-endian bits of the circuit.

source

fn to_bits_be(&self) -> Vec<Self::Boolean, Global>

Returns the big-endian bits of the circuit.

Trait Implementations§

§

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

§

type Case = Mode

§

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

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

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

§

type Case = Mode

§

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

Returns the mode of the output.

Implementations on Foreign Types§

source§

impl<B, C0, C1, C2, C3, C4, C5, C6, C7> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2, C3, C4, C5, C6, C7, C8> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7, C8)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>, C8: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7, C8) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7, C8) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2> ToBits for &'a (C0, C1, C2)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>,

source§

fn to_bits_le(&self) -> Vec<<&'a (C0, C1, C2) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<&'a (C0, C1, C2) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>, C8: ToBits<Boolean = B>, C9: ToBits<Boolean = B>, C10: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3, C4, C5, C6> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3> ToBits for &'a (C0, C1, C2, C3)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>,

source§

fn to_bits_le(&self) -> Vec<<&'a (C0, C1, C2, C3) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<&'a (C0, C1, C2, C3) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<C, B> ToBits for Vec<C, Global>where C: ToBits<Boolean = B>, B: BooleanTrait,

source§

fn to_bits_le(&self) -> Vec<<Vec<C, Global> as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<Vec<C, Global> as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3, C4, C5, C6, C7, C8> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>, C8: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7, C8) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7, C8) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2, C3> ToBits for (C0, C1, C2, C3)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>,

source§

fn to_bits_le(&self) -> Vec<<(C0, C1, C2, C3) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<(C0, C1, C2, C3) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1> ToBits for &'a (C0, C1)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>,

source§

fn to_bits_le(&self) -> Vec<<&'a (C0, C1) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<&'a (C0, C1) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3, C4> ToBits for &'a (C0, C1, C2, C3, C4)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3, C4, C5, C6, C7> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<C, B, const N: usize> ToBits for [C; N]where C: ToBits<Boolean = B>, B: BooleanTrait,

source§

fn to_bits_le(&self) -> Vec<<[C; N] as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<[C; N] as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>, C8: ToBits<Boolean = B>, C9: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2, C3, C4> ToBits for (C0, C1, C2, C3, C4)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>,

source§

fn to_bits_le(&self) -> Vec<<(C0, C1, C2, C3, C4) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<(C0, C1, C2, C3, C4) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2> ToBits for (C0, C1, C2)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>,

source§

fn to_bits_le(&self) -> Vec<<(C0, C1, C2) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<(C0, C1, C2) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>, C8: ToBits<Boolean = B>, C9: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<C, B> ToBits for &[C]where C: ToBits<Boolean = B>, B: BooleanTrait,

source§

fn to_bits_le(&self) -> Vec<<&[C] as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<&[C] as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1> ToBits for (C0, C1)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>,

source§

fn to_bits_le(&self) -> Vec<<(C0, C1) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be(&self) -> Vec<<(C0, C1) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>, C7: ToBits<Boolean = B>, C8: ToBits<Boolean = B>, C9: ToBits<Boolean = B>, C10: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<'a, B, C0, C1, C2, C3, C4, C5> ToBits for &'a (C0, C1, C2, C3, C4, C5)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<&'a (C0, C1, C2, C3, C4, C5) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2, C3, C4, C5> ToBits for (C0, C1, C2, C3, C4, C5)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

source§

impl<B, C0, C1, C2, C3, C4, C5, C6> ToBits for (C0, C1, C2, C3, C4, C5, C6)where B: BooleanTrait, C0: ToBits<Boolean = B>, C1: ToBits<Boolean = B>, C2: ToBits<Boolean = B>, C3: ToBits<Boolean = B>, C4: ToBits<Boolean = B>, C5: ToBits<Boolean = B>, C6: ToBits<Boolean = B>,

source§

fn to_bits_le( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of little-endian bits from the circuits.

source§

fn to_bits_be( &self ) -> Vec<<(C0, C1, C2, C3, C4, C5, C6) as ToBits>::Boolean, Global>

A helper method to return a concatenated list of big-endian bits from the circuits.

§

type Boolean = B

§

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

§

fn to_bits_le(&self) -> Vec<<&Integer<E, I> as ToBits>::Boolean, Global>

Outputs the little-endian bit representation of self with trailing zeros.

§

fn to_bits_be(&self) -> Vec<<&Integer<E, I> as ToBits>::Boolean, Global>

Outputs the big-endian bit representation of self with leading zeros.

§

type Boolean = Boolean<E>

§

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

§

fn to_bits_le(&self) -> Vec<<Integer<E, I> as ToBits>::Boolean, Global>

Outputs the little-endian bit representation of self with trailing zeros.

§

fn to_bits_be(&self) -> Vec<<Integer<E, I> as ToBits>::Boolean, Global>

Outputs the big-endian bit representation of self with leading zeros.

§

type Boolean = Boolean<E>

Implementors§

source§

impl<A> ToBits for &Literal<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for &Identifier<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for &ProgramID<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Entry<A, Plaintext<A>>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Entry<A, Ciphertext<A>>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Literal<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Owner<A, Plaintext<A>>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Owner<A, Ciphertext<A>>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Plaintext<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Value<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Ciphertext<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for HeaderLeaf<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Identifier<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for ProgramID<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Record<A, Plaintext<A>>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for Record<A, Ciphertext<A>>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for TransactionLeaf<A>where A: Aleo,

§

type Boolean = Boolean<A>

source§

impl<A> ToBits for TransitionLeaf<A>where A: Aleo,

§

type Boolean = Boolean<A>

§

impl<E> ToBits for &Address<E>where E: Environment,

§

type Boolean = Boolean<E>

§

impl<E> ToBits for &Boolean<E>where E: Environment,

§

type Boolean = Boolean<E>

§

impl<E> ToBits for &Field<E>where E: Environment,

§

type Boolean = Boolean<E>

§

impl<E> ToBits for &Group<E>where E: Environment,

§

type Boolean = Boolean<E>

§

impl<E> ToBits for &Scalar<E>where E: Environment,

§

type Boolean = Boolean<E>

§

impl<E> ToBits for &StringType<E>where E: Environment,

§

type Boolean = Boolean<E>

§

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

§

type Boolean = Boolean<E>

§

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

§

type Boolean = Boolean<E>

§

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

§

type Boolean = Boolean<E>

§

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

§

type Boolean = Boolean<E>

§

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

§

type Boolean = Boolean<E>

§

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

§

type Boolean = Boolean<E>