pub trait ToLowerBits {
    type Boolean: BooleanTrait;

    // Required methods
    fn to_lower_bits_le(&self, k: usize) -> Vec<Self::Boolean, Global>;
    fn to_lower_bits_be(&self, k: usize) -> Vec<Self::Boolean, Global>;
}
Expand description

Unary operator for converting to k number of bits.

Required Associated Types§

Required Methods§

source

fn to_lower_bits_le(&self, k: usize) -> Vec<Self::Boolean, Global>

Outputs the lower k bits of an n-bit element in little-endian representation. Enforces that the upper n - k bits are zero.

source

fn to_lower_bits_be(&self, k: usize) -> Vec<Self::Boolean, Global>

Outputs the lower k bits of an n-bit element in big-endian representation. Enforces that the upper n - k bits are zero.

Trait Implementations§

source§

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

§

type Case = (Mode, u64)

source§

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

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

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

§

type Case = Mode

source§

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

Returns the mode of the output.

Implementors§

source§

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

§

type Boolean = Boolean<E>