pub struct Null;Expand description
Null is a zero-sized type that absorbs any arithmetic and always returns
itself.
It also has itself as its in-circuit representation, which does not allocate any variables or require any constraints.
Trait Implementations§
Source§impl<F: Field> AllocVar<Null, F> for Null
impl<F: Field> AllocVar<Null, F> for Null
Source§fn new_variable<T: Borrow<Null>>(
_cs: impl Into<Namespace<F>>,
_f: impl FnOnce() -> Result<T, SynthesisError>,
_mode: AllocationMode,
) -> Result<Self, SynthesisError>
fn new_variable<T: Borrow<Null>>( _cs: impl Into<Namespace<F>>, _f: impl FnOnce() -> Result<T, SynthesisError>, _mode: AllocationMode, ) -> Result<Self, SynthesisError>
Allocates a new variable of type
Self in the ConstraintSystem cs.
The mode of allocation is decided by mode.Source§fn new_constant(
cs: impl Into<Namespace<F>>,
t: impl Borrow<V>,
) -> Result<Self, SynthesisError>
fn new_constant( cs: impl Into<Namespace<F>>, t: impl Borrow<V>, ) -> Result<Self, SynthesisError>
Source§fn new_input<T>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>where
T: Borrow<V>,
fn new_input<T>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>where
T: Borrow<V>,
Allocates a new public input of type
Self in the ConstraintSystem
cs.Source§fn new_witness<T>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>where
T: Borrow<V>,
fn new_witness<T>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>where
T: Borrow<V>,
Allocates a new private witness of type
Self in the ConstraintSystem
cs.Source§fn new_variable_with_inferred_mode<T>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>where
T: Borrow<V>,
fn new_variable_with_inferred_mode<T>(
cs: impl Into<Namespace<F>>,
f: impl FnOnce() -> Result<T, SynthesisError>,
) -> Result<Self, SynthesisError>where
T: Borrow<V>,
Allocates a new constant or private witness of type
Self in the
ConstraintSystem cs with the allocation mode inferred from cs.
A constant is allocated if cs is None, and a private witness is
allocated otherwise. Read moreimpl Copy for Null
impl Eq for Null
Source§impl<F: Field> GR1CSVar<F> for Null
impl<F: Field> GR1CSVar<F> for Null
Source§type Value = Null
type Value = Null
The type of the “native” value that
Self represents in the constraint
system.Source§fn cs(&self) -> ConstraintSystemRef<F>
fn cs(&self) -> ConstraintSystemRef<F>
Returns the underlying
ConstraintSystemRef. Read moreSource§fn value(&self) -> Result<Self::Value, SynthesisError>
fn value(&self) -> Result<Self::Value, SynthesisError>
Returns the value that is assigned to
self in the underlying
ConstraintSystem.Source§fn is_constant(&self) -> bool
fn is_constant(&self) -> bool
Returns
true if self is a circuit-generation-time constant.impl StructuralPartialEq for Null
Auto Trait Implementations§
impl Freeze for Null
impl RefUnwindSafe for Null
impl Send for Null
impl Sync for Null
impl Unpin for Null
impl UnsafeUnpin for Null
impl UnwindSafe for Null
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more