pub struct U32Sub {
pub xin: Col<B1, 32>,
pub yin: Col<B1, 32>,
pub zout: Col<B1, 32>,
pub final_borrow: Option<Col<B1>>,
pub flags: U32SubFlags,
/* private fields */
}
Expand description
A gadget for performing 32-bit integer subtraction on vertically-packed bit columns.
This gadget has input columns xin
and yin
for the two 32-bit integers to be subtracted, and
an output column zout
, and it constrains that xin - yin = zout
as integers.
Fields§
§xin: Col<B1, 32>
§yin: Col<B1, 32>
§zout: Col<B1, 32>
The output column, either committed if flags.commit_zout
is set, otherwise a linear
combination derived column.
final_borrow: Option<Col<B1>>
This is Some
if flags.expose_final_borrow
is set, otherwise it is None
.
flags: U32SubFlags
Flags modifying the gadget’s behavior.
Implementations§
Source§impl U32Sub
impl U32Sub
pub fn new( table: &mut TableBuilder<'_>, xin: Col<B1, 32>, yin: Col<B1, 32>, flags: U32SubFlags, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for U32Sub
impl RefUnwindSafe for U32Sub
impl Send for U32Sub
impl Sync for U32Sub
impl Unpin for U32Sub
impl UnwindSafe for U32Sub
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
§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