pub struct AndConstraint {
pub a: Operand,
pub b: Operand,
pub c: Operand,
}Expand description
AND constraint: A & B = C.
This constraint verifies that the bitwise AND of operands A and B equals operand C. Each operand is computed as the XOR of multiple shifted values from the value vector.
Fields§
§a: OperandOperand A.
b: OperandOperand B.
c: OperandOperand C.
Implementations§
Source§impl AndConstraint
impl AndConstraint
Sourcepub fn plain_abc(
a: impl IntoIterator<Item = ValueIndex>,
b: impl IntoIterator<Item = ValueIndex>,
c: impl IntoIterator<Item = ValueIndex>,
) -> AndConstraint
pub fn plain_abc( a: impl IntoIterator<Item = ValueIndex>, b: impl IntoIterator<Item = ValueIndex>, c: impl IntoIterator<Item = ValueIndex>, ) -> AndConstraint
Creates a new AND constraint from XOR combinations of the given unshifted values.
Sourcepub fn abc(
a: impl IntoIterator<Item = ShiftedValueIndex>,
b: impl IntoIterator<Item = ShiftedValueIndex>,
c: impl IntoIterator<Item = ShiftedValueIndex>,
) -> AndConstraint
pub fn abc( a: impl IntoIterator<Item = ShiftedValueIndex>, b: impl IntoIterator<Item = ShiftedValueIndex>, c: impl IntoIterator<Item = ShiftedValueIndex>, ) -> AndConstraint
Creates a new AND constraint from XOR combinations of the given shifted values.
Trait Implementations§
Source§impl Clone for AndConstraint
impl Clone for AndConstraint
Source§fn clone(&self) -> AndConstraint
fn clone(&self) -> AndConstraint
Returns a duplicate of the value. Read more
1.0.0 · 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 AndConstraint
impl Debug for AndConstraint
Source§impl Default for AndConstraint
impl Default for AndConstraint
Source§fn default() -> AndConstraint
fn default() -> AndConstraint
Returns the “default value” for a type. Read more
Source§impl DeserializeBytes for AndConstraint
impl DeserializeBytes for AndConstraint
fn deserialize(read_buf: impl Buf) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl SerializeBytes for AndConstraint
impl SerializeBytes for AndConstraint
Auto Trait Implementations§
impl Freeze for AndConstraint
impl RefUnwindSafe for AndConstraint
impl Send for AndConstraint
impl Sync for AndConstraint
impl Unpin for AndConstraint
impl UnwindSafe for AndConstraint
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<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