snarkvm_fields::traits

Trait ToConstraintField

Source
pub trait ToConstraintField<F: Field>: Debug {
    // Required method
    fn to_field_elements(&self) -> Result<Vec<F>, ConstraintFieldError>;
}
Expand description

Types that can be converted to a vector of F elements. Useful for specifying how public inputs to a constraint system should be represented inside that constraint system.

Required Methods§

Implementations on Foreign Types§

Source§

impl<F: Field> ToConstraintField<F> for bool

Source§

impl<F: Field> ToConstraintField<F> for [F]

Source§

impl<F: Field> ToConstraintField<F> for ()

Source§

impl<F: Field> ToConstraintField<F> for Vec<F>

Source§

impl<F: PrimeField> ToConstraintField<F> for [bool]

Source§

impl<F: PrimeField> ToConstraintField<F> for [u8]

Source§

impl<F: PrimeField, const NUM_BITS: usize> ToConstraintField<F> for [bool; NUM_BITS]

Source§

impl<F: PrimeField, const NUM_BYTES: usize> ToConstraintField<F> for [u8; NUM_BYTES]

Implementors§