Trait snarkvm_wasm::bits::to_bits::ToBitsBEGadget[][src]

pub trait ToBitsBEGadget<F> where
    F: Field
{ fn to_bits_be<CS>(
        &self,
        cs: CS
    ) -> Result<Vec<Boolean, Global>, SynthesisError>
    where
        CS: ConstraintSystem<F>
;
fn to_bits_be_strict<CS>(
        &self,
        cs: CS
    ) -> Result<Vec<Boolean, Global>, SynthesisError>
    where
        CS: ConstraintSystem<F>
; }

Required methods

fn to_bits_be<CS>(&self, cs: CS) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Additionally checks if the produced list of booleans is ‘valid’.

Implementations on Foreign Types

impl<F> ToBitsBEGadget<F> for Vec<Boolean, Global> where
    F: Field
[src]

pub fn to_bits_be<CS>(
    &self,
    _cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    _cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<F> ToBitsBEGadget<F> for [Boolean] where
    F: Field
[src]

pub fn to_bits_be<CS>(
    &self,
    _cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    _cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Implementors

impl<F> ToBitsBEGadget<F> for Boolean where
    F: Field
[src]

pub fn to_bits_be<CS>(&self, CS) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<F> ToBitsBEGadget<F> for FpGadget<F> where
    F: PrimeField
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Outputs the binary representation of the value in self in big-endian form.

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<F> ToBitsBEGadget<F> for AllocatedFp<F> where
    F: PrimeField
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

Outputs the binary representation of the value in self in big-endian form.

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<P, F> ToBitsBEGadget<F> for Elligator2FieldGadget<P, F> where
    P: MontgomeryModelParameters,
    F: PrimeField
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<P, F> ToBitsBEGadget<F> for Fp2Gadget<P, F> where
    P: Fp2Parameters<Fp = F>,
    F: PrimeField
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<P, F> ToBitsBEGadget<F> for Fp6Gadget<P, F> where
    P: Fp6Parameters,
    F: PrimeField,
    <P as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<P as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<P, F> ToBitsBEGadget<F> for Fp12Gadget<P, F> where
    P: Fp12Parameters,
    F: PrimeField,
    <<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params: Fp2Parameters,
    <<<P as Fp12Parameters>::Fp6Params as Fp6Parameters>::Fp2Params as Fp2Parameters>::Fp == F, 
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<P, F, FG> ToBitsBEGadget<F> for snarkvm_wasm::curves::templates::bls12::AffineGadget<P, F, FG> where
    P: SWModelParameters,
    F: Field,
    FG: FieldGadget<<P as ModelParameters>::BaseField, F>, 
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<P, F, FG> ToBitsBEGadget<F> for snarkvm_wasm::curves::templates::twisted_edwards::AffineGadget<P, F, FG> where
    P: TEModelParameters,
    F: Field,
    FG: FieldGadget<<P as ModelParameters>::BaseField, F>, 
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<F>, 
[src]

impl<TargetField, BaseField> ToBitsBEGadget<BaseField> for NonNativeFieldVar<TargetField, BaseField> where
    BaseField: PrimeField,
    TargetField: PrimeField
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

impl<TargetField, BaseField> ToBitsBEGadget<BaseField> for AllocatedNonNativeFieldVar<TargetField, BaseField> where
    BaseField: PrimeField,
    TargetField: PrimeField
[src]

pub fn to_bits_be<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]

pub fn to_bits_be_strict<CS>(
    &self,
    cs: CS
) -> Result<Vec<Boolean, Global>, SynthesisError> where
    CS: ConstraintSystem<BaseField>, 
[src]