Trait ark_r1cs_std::bits::ToBytesGadget [−][src]
pub trait ToBytesGadget<F: Field> { fn to_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError>; fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError> { ... } }
Expand description
Specifies constraints for conversion to a little-endian byte representation
of self
.
Required methods
Provided methods
fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError>
fn to_non_unique_bytes(&self) -> Result<Vec<UInt8<F>>, SynthesisError>
Outputs a possibly non-unique byte decomposition of self
.
If you’re not absolutely certain that your usecase can get away with a
non-canonical representation, please use self.to_bytes(cs)
instead.
Implementations on Foreign Types
Implementors
impl<BF, P> ToBytesGadget<<P as CubicExtParameters>::BasePrimeField> for CubicExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'a> &'a BF: FieldOpsBounds<'a, P::BaseField, BF>,
P: CubicExtVarParams<BF>,
impl<BF, P> ToBytesGadget<<P as QuadExtParameters>::BasePrimeField> for QuadExtVar<BF, P> where
BF: FieldVar<P::BaseField, P::BasePrimeField>,
for<'b> &'b BF: FieldOpsBounds<'b, P::BaseField, BF>,
P: QuadExtVarParams<BF>,
impl<P, F> ToBytesGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for ProjectiveVar<P, F> where
P: SWModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'a> &'a F: FieldOpsBounds<'a, P::BaseField, F>,
impl<P, F> ToBytesGadget<<<P as ModelParameters>::BaseField as Field>::BasePrimeField> for AffineVar<P, F> where
P: TEModelParameters,
F: FieldVar<P::BaseField, <P::BaseField as Field>::BasePrimeField>,
for<'b> &'b F: FieldOpsBounds<'b, P::BaseField, F>,
impl<P: Bls12Parameters> ToBytesGadget<<P as Bls12Parameters>::Fp> for ark_r1cs_std::groups::curves::short_weierstrass::bls12::G1PreparedVar<P>
impl<P: Bls12Parameters> ToBytesGadget<<P as Bls12Parameters>::Fp> for ark_r1cs_std::groups::curves::short_weierstrass::bls12::G2PreparedVar<P>
impl<P: MNT4Parameters> ToBytesGadget<<P as MNT4Parameters>::Fp> for ark_r1cs_std::groups::curves::short_weierstrass::mnt4::G1PreparedVar<P>
impl<P: MNT4Parameters> ToBytesGadget<<P as MNT4Parameters>::Fp> for ark_r1cs_std::groups::curves::short_weierstrass::mnt4::G2PreparedVar<P>
impl<P: MNT6Parameters> ToBytesGadget<<P as MNT6Parameters>::Fp> for ark_r1cs_std::groups::curves::short_weierstrass::mnt6::G1PreparedVar<P>
impl<P: MNT6Parameters> ToBytesGadget<<P as MNT6Parameters>::Fp> for ark_r1cs_std::groups::curves::short_weierstrass::mnt6::G2PreparedVar<P>