pub trait ToBits {
    type Boolean: BooleanTrait;

    // Required methods
    fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>);
    fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>);

    // Provided methods
    fn to_bits_le(&self) -> Vec<Self::Boolean> { ... }
    fn to_bits_be(&self) -> Vec<Self::Boolean> { ... }
}
Expand description

Unary operator for converting to bits.

Required Associated Types§

Required Methods§

source

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

source

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

Provided Methods§

source

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

Returns the little-endian bits of the circuit.

source

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

Returns the big-endian bits of the circuit.

Implementations on Foreign Types§

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<'a, 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>> ToBits for &'a (C0, C1, C2, C3, C4, C5)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<'a, 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>> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<'a, 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>> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<'a, 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>> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<'a, 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>> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<'a, 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>> ToBits for &'a (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<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>> ToBits for (C0, C1, C2, C3, C4, C5)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<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>> ToBits for (C0, C1, C2, C3, C4, C5, C6)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<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>> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<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>> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7, C8)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<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>> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

impl<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>> ToBits for (C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10)

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

source§

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

source§

fn write_bits_le(&self, vec: &mut Vec<Self::Boolean>)

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

source§

fn write_bits_be(&self, vec: &mut Vec<Self::Boolean>)

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

§

type Boolean = B

Implementors§