Struct snarkvm_gadgets::nonnative::NonNativeFieldInputVar
source · [−]pub struct NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField, {
pub val: Vec<NonNativeFieldVar<F, CF>>,
}
Expand description
Conversion of field elements by allocating them as nonnative field elements Used by Marlin
Fields
val: Vec<NonNativeFieldVar<F, CF>>
Vector of nonnative field gadgets.
Implementations
sourceimpl<F, CF> NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
impl<F, CF> NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
sourcepub fn new(val: Vec<NonNativeFieldVar<F, CF>>) -> Self
pub fn new(val: Vec<NonNativeFieldVar<F, CF>>) -> Self
Instantiate a new NonNativeFieldInputVar
.
Trait Implementations
sourceimpl<F, CF> AllocGadget<Vec<F, Global>, CF> for NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
impl<F, CF> AllocGadget<Vec<F, Global>, CF> for NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
fn alloc_constant<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Vec<F>>, CS: ConstraintSystem<CF>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Vec<F>>, CS: ConstraintSystem<CF>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_input<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<Vec<F>>, CS: ConstraintSystem<CF>>(
cs: CS,
value_gen: Fn
) -> Result<Self, SynthesisError>
fn alloc_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
fn alloc_input_checked<Fn: FnOnce() -> Result<T, SynthesisError>, T: Borrow<V>, CS: ConstraintSystem<F>>(
cs: CS,
f: Fn
) -> Result<Self, SynthesisError>
sourceimpl<F, CF> Clone for NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
impl<F, CF> Clone for NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
sourceimpl<F: PrimeField, CF: PrimeField> FromFieldElementsGadget<F, CF> for NonNativeFieldInputVar<F, CF>
impl<F: PrimeField, CF: PrimeField> FromFieldElementsGadget<F, CF> for NonNativeFieldInputVar<F, CF>
sourcefn from_field_elements<CS: ConstraintSystem<CF>>(
cs: CS,
field_elements: &[FpGadget<CF>]
) -> Result<Self, SynthesisError>
fn from_field_elements<CS: ConstraintSystem<CF>>(
cs: CS,
field_elements: &[FpGadget<CF>]
) -> Result<Self, SynthesisError>
Converts FpGadget<F>
variables to self
.
sourceimpl<F, CF> IntoIterator for NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
impl<F, CF> IntoIterator for NonNativeFieldInputVar<F, CF> where
F: PrimeField,
CF: PrimeField,
type IntoIter = IntoIter<NonNativeFieldVar<F, CF>>
type IntoIter = IntoIter<NonNativeFieldVar<F, CF>>
Which kind of iterator are we turning this into?
type Item = NonNativeFieldVar<F, CF>
type Item = NonNativeFieldVar<F, CF>
The type of the elements being iterated over.
sourceimpl<F: PrimeField, CF: PrimeField> MergeGadget<CF> for NonNativeFieldInputVar<F, CF>
impl<F: PrimeField, CF: PrimeField> MergeGadget<CF> for NonNativeFieldInputVar<F, CF>
fn merge<CS: ConstraintSystem<CF>>(
&self,
_cs: CS,
other: &Self
) -> Result<Self, SynthesisError>
fn merge_in_place<CS: ConstraintSystem<CF>>(
&mut self,
_cs: CS,
other: &Self
) -> Result<(), SynthesisError>
fn merge_many<CS: ConstraintSystem<F>>(
cs: CS,
elems: &[Self]
) -> Result<Self, SynthesisError>
sourceimpl<F: PrimeField, CF: PrimeField> ToBitsLEGadget<CF> for NonNativeFieldInputVar<F, CF>
impl<F: PrimeField, CF: PrimeField> ToBitsLEGadget<CF> for NonNativeFieldInputVar<F, CF>
fn to_bits_le<CS: ConstraintSystem<CF>>(
&self,
cs: CS
) -> Result<Vec<Boolean>, SynthesisError>
sourcefn to_bits_le_strict<CS: ConstraintSystem<CF>>(
&self,
cs: CS
) -> Result<Vec<Boolean>, SynthesisError>
fn to_bits_le_strict<CS: ConstraintSystem<CF>>(
&self,
cs: CS
) -> Result<Vec<Boolean>, SynthesisError>
Additionally checks if the produced list of booleans is ‘valid’.
Auto Trait Implementations
impl<F, CF> RefUnwindSafe for NonNativeFieldInputVar<F, CF> where
CF: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, CF> Send for NonNativeFieldInputVar<F, CF>
impl<F, CF> Sync for NonNativeFieldInputVar<F, CF>
impl<F, CF> Unpin for NonNativeFieldInputVar<F, CF> where
CF: Unpin,
F: Unpin,
impl<F, CF> UnwindSafe for NonNativeFieldInputVar<F, CF> where
CF: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more