pub struct ZeroConstraint(pub [Operand; 1]);Expand description
Zero constraint: VAL = 0.
This constraint verifies that a single operand vanishes, where the operand is the XOR of
multiple shifted values from the value vector. It expresses an arbitrary F_2-linear relation
among shifted words: a two-term operand constrains two shifted values to be equal, and a
three-term operand [x, y, z] forces z = x ^ y.
The operands are stored in the order given by ZeroConstraint::OPERAND_NAMES.
Tuple Fields§
§0: [Operand; 1]Implementations§
Source§impl ZeroConstraint
impl ZeroConstraint
Sourcepub const KIND: ConstraintKind = ConstraintKind::Zero
pub const KIND: ConstraintKind = ConstraintKind::Zero
Kind of this constraint.
Sourcepub const OPERAND_NAMES: [&'static str; 1]
pub const OPERAND_NAMES: [&'static str; 1]
Names of the operands, in storage order.
Sourcepub fn plain(val: impl IntoIterator<Item = ValueIndex>) -> ZeroConstraint
pub fn plain(val: impl IntoIterator<Item = ValueIndex>) -> ZeroConstraint
Creates a new Zero constraint from an XOR combination of the given unshifted values.
Sourcepub fn new(val: impl IntoIterator<Item = ShiftedValueIndex>) -> ZeroConstraint
pub fn new(val: impl IntoIterator<Item = ShiftedValueIndex>) -> ZeroConstraint
Creates a new Zero constraint from an XOR combination of the given shifted values.
Trait Implementations§
Source§impl AsRef<[Vec<ShiftedValueIndex>; 1]> for ZeroConstraint
impl AsRef<[Vec<ShiftedValueIndex>; 1]> for ZeroConstraint
Source§impl Clone for ZeroConstraint
impl Clone for ZeroConstraint
Source§fn clone(&self) -> ZeroConstraint
fn clone(&self) -> ZeroConstraint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZeroConstraint
impl Debug for ZeroConstraint
Source§impl Default for ZeroConstraint
impl Default for ZeroConstraint
Source§fn default() -> ZeroConstraint
fn default() -> ZeroConstraint
Returns the “default value” for a type. Read more
Source§impl DeserializeBytes for ZeroConstraint
impl DeserializeBytes for ZeroConstraint
fn deserialize(read_buf: impl Buf) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl SerializeBytes for ZeroConstraint
impl SerializeBytes for ZeroConstraint
Auto Trait Implementations§
impl Freeze for ZeroConstraint
impl RefUnwindSafe for ZeroConstraint
impl Send for ZeroConstraint
impl Sync for ZeroConstraint
impl Unpin for ZeroConstraint
impl UnsafeUnpin for ZeroConstraint
impl UnwindSafe for ZeroConstraint
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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