pub struct GateChip<F: ScalarField> {
pub pow_of_two: Vec<F>,
pub field_element_cache: Vec<F>,
/* private fields */
}Expand description
A chip that implements the GateInstructions trait supporting basic arithmetic operations.
Fields
pow_of_two: Vec<F>The field elements 2^i for i in 0..F::NUM_BITS.
field_element_cache: Vec<F>To avoid Montgomery conversion in F::from for common small numbers, we keep a cache of field elements.
Implementations
sourceimpl<F: ScalarField> GateChip<F>
impl<F: ScalarField> GateChip<F>
sourcepub fn new(strategy: GateStrategy) -> Self
pub fn new(strategy: GateStrategy) -> Self
Returns a new GateChip with the given GateStrategy.
Trait Implementations
sourceimpl<F: Clone + ScalarField> Clone for GateChip<F>
impl<F: Clone + ScalarField> Clone for GateChip<F>
sourceimpl<F: Debug + ScalarField> Debug for GateChip<F>
impl<F: Debug + ScalarField> Debug for GateChip<F>
sourceimpl<F: ScalarField> Default for GateChip<F>
impl<F: ScalarField> Default for GateChip<F>
sourceimpl<F: ScalarField> GateInstructions<F> for GateChip<F>
impl<F: ScalarField> GateInstructions<F> for GateChip<F>
sourcefn strategy(&self) -> GateStrategy
fn strategy(&self) -> GateStrategy
Returns the GateStrategy the GateChip.
sourcefn pow_of_two(&self) -> &[F]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn pow_of_two(&self) -> &[F]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Returns a slice of the ScalarField elements 2i for i in 0..F::NUM_BITS.
sourcefn get_field_element(&self, n: u64) -> F
fn get_field_element(&self, n: u64) -> F
Returns the the value of n as a ScalarField element.
n: the u64 value to convert
sourcefn inner_product<QA>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QuantumCell<F>>
) -> AssignedValue<F>where
QA: Into<QuantumCell<F>>,
fn inner_product<QA>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QuantumCell<F>>
) -> AssignedValue<F>where
QA: Into<QuantumCell<F>>,
Constrains and returns the inner product of <a, b>.
Assumes ‘a’ and ‘b’ are the same length.
ctx: Context to add the constraints toa: Iterator of QuantumCell valuesb: Iterator of QuantumCell values to take inner product ofaby
sourcefn inner_product_left_last<QA>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QuantumCell<F>>
) -> (AssignedValue<F>, AssignedValue<F>)where
QA: Into<QuantumCell<F>>,
fn inner_product_left_last<QA>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QuantumCell<F>>
) -> (AssignedValue<F>, AssignedValue<F>)where
QA: Into<QuantumCell<F>>,
Returns the inner product of <a, b> and returns a tuple of the last item of a after it is assigned and the item to its left (left_a, last_a).
Assumes ‘a’ and ‘b’ are the same length.
ctx: Context of the circuita: Iterator of QuantumCellsb: Iterator of QuantumCells to take inner product ofaby
sourcefn inner_product_with_sums<'thread, QA>(
&self,
ctx: &'thread mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QuantumCell<F>>
) -> Box<dyn Iterator<Item = AssignedValue<F>> + 'thread>where
QA: Into<QuantumCell<F>>,
fn inner_product_with_sums<'thread, QA>(
&self,
ctx: &'thread mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QuantumCell<F>>
) -> Box<dyn Iterator<Item = AssignedValue<F>> + 'thread>where
QA: Into<QuantumCell<F>>,
Calculates and constrains the inner product.
Returns the assignment trace where output[i] has the running sum sum_{j=0..=i} a[j] * b[j].
Assumes ‘a’ and ‘b’ are the same length.
ctx: Context to add the constraints toa: Iterator of QuantumCell valuesb: Iterator of QuantumCell values to calculate the partial sums of the inner product ofaby
sourcefn sum_products_with_coeff_and_var(
&self,
ctx: &mut Context<F>,
values: impl IntoIterator<Item = (F, QuantumCell<F>, QuantumCell<F>)>,
var: QuantumCell<F>
) -> AssignedValue<F>
fn sum_products_with_coeff_and_var(
&self,
ctx: &mut Context<F>,
values: impl IntoIterator<Item = (F, QuantumCell<F>, QuantumCell<F>)>,
var: QuantumCell<F>
) -> AssignedValue<F>
Constrains and returns the sum of products of coeff * (a * b) defined in values plus a variable var e.g.
x = var + values[0].0 * (values[0].1 * values[0].2) + values[1].0 * (values[1].1 * values[1].2) + ... + values[n].0 * (values[n].1 * values[n].2).
ctx: Context to add the constraints tovalues: Iterator of tuples(coeff, a, b)wherecoeffis a field element,aandbare QuantumCell’svar: QuantumCell that represents the value of a variable added to the sum
sourcefn select(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>,
sel: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn select(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>,
sel: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
Constrains and returns sel ? a : b assuming sel is boolean.
Defines a vertical gate of form | 1 - sel | sel | 1 | a | 1 - sel | sel | 1 | b | out |, where out = sel * a + (1 - sel) * b.
ctx: Context to add the constraints toa: QuantumCell that contains a boolean valueb: QuantumCell that contains a boolean valuesel: QuantumCell that contains a boolean value
sourcefn or_and(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>,
c: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn or_and(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>,
c: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
Constains and returns a || (b && c), assuming a, b and c are boolean.
Defines a vertical gate of form | 1 - b c | b | c | 1 | a - 1 | 1 - b c | out | a - 1 | 1 | 1 | a |, where out = a + b * c - a * b * c.
ctx: Context to add the constraints toa: QuantumCell that contains a boolean valueb: QuantumCell that contains a boolean valuec: QuantumCell that contains a boolean value
sourcefn num_to_bits(
&self,
ctx: &mut Context<F>,
a: AssignedValue<F>,
range_bits: usize
) -> Vec<AssignedValue<F>>
fn num_to_bits(
&self,
ctx: &mut Context<F>,
a: AssignedValue<F>,
range_bits: usize
) -> Vec<AssignedValue<F>>
Constrains and returns little-endian bit vector representation of a.
Assumes range_bits >= number of bits in a.
a: QuantumCell of the value to convertrange_bits: range of bits needed to representa. Assumesrange_bits > 0.
sourcefn const_right_rotate_unsafe<const BIT: usize, const NUM_BITS: usize>(
&self,
ctx: &mut Context<F>,
a: AssignedValue<F>
) -> AssignedValue<F>
fn const_right_rotate_unsafe<const BIT: usize, const NUM_BITS: usize>(
&self,
ctx: &mut Context<F>,
a: AssignedValue<F>
) -> AssignedValue<F>
sourcefn const_left_rotate_unsafe<const BIT: usize, const NUM_BITS: usize>(
&self,
ctx: &mut Context<F>,
a: AssignedValue<F>
) -> AssignedValue<F>
fn const_left_rotate_unsafe<const BIT: usize, const NUM_BITS: usize>(
&self,
ctx: &mut Context<F>,
a: AssignedValue<F>
) -> AssignedValue<F>
sourcefn add(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn add(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
a + b * 1 = out. Read moresourcefn sub(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn sub(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
a + b * (-1) = out. Read moresourcefn neg(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn neg(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
a * (-1) = out. Read moresourcefn mul(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn mul(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
0 + a * b = out. Read moresourcefn mul_add(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>,
c: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn mul_add(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>,
c: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
a * b + c = out. Read moresourcefn mul_not(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn mul_not(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
(1 - a) * b = b - a * b. Read moresourcefn assert_bit(&self, ctx: &mut Context<F>, x: AssignedValue<F>)
fn assert_bit(&self, ctx: &mut Context<F>, x: AssignedValue<F>)
sourcefn div_unsafe(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn div_unsafe(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
sourcefn assert_is_const(&self, ctx: &mut Context<F>, a: &AssignedValue<F>, constant: &F)
fn assert_is_const(&self, ctx: &mut Context<F>, a: &AssignedValue<F>, constant: &F)
sourcefn sum<Q>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = Q>
) -> AssignedValue<F>where
Q: Into<QuantumCell<F>>,
fn sum<Q>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = Q>
) -> AssignedValue<F>where
Q: Into<QuantumCell<F>>,
sourcefn partial_sums<'thread, Q>(
&self,
ctx: &'thread mut Context<F>,
a: impl IntoIterator<Item = Q>
) -> Box<dyn Iterator<Item = AssignedValue<F>> + 'thread>where
Q: Into<QuantumCell<F>>,
fn partial_sums<'thread, Q>(
&self,
ctx: &'thread mut Context<F>,
a: impl IntoIterator<Item = Q>
) -> Box<dyn Iterator<Item = AssignedValue<F>> + 'thread>where
Q: Into<QuantumCell<F>>,
a. Read moresourcefn accumulated_product<QA, QB>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QB>
) -> Vec<AssignedValue<F>>where
QA: Into<QuantumCell<F>>,
QB: Into<QuantumCell<F>>,
fn accumulated_product<QA, QB>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = QA>,
b: impl IntoIterator<Item = QB>
) -> Vec<AssignedValue<F>>where
QA: Into<QuantumCell<F>>,
QB: Into<QuantumCell<F>>,
x_i = b_1 * (a_1...a_{i - 1}) + b_2 * (a_2...a_{i - 1}) + ... + b_i Read moresourcefn or(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn or(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
sourcefn and(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn and(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
sourcefn xor(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn xor(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
sourcefn not(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn not(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
sourcefn bits_to_indicator(
&self,
ctx: &mut Context<F>,
bits: &[AssignedValue<F>]
) -> Vec<AssignedValue<F>>
fn bits_to_indicator(
&self,
ctx: &mut Context<F>,
bits: &[AssignedValue<F>]
) -> Vec<AssignedValue<F>>
output[idx] = 1 iff idx = (the number represented by bits in binary little endian), otherwise output[idx] = 0. Read moresourcefn idx_to_indicator(
&self,
ctx: &mut Context<F>,
idx: impl Into<QuantumCell<F>>,
len: usize
) -> Vec<AssignedValue<F>>
fn idx_to_indicator(
&self,
ctx: &mut Context<F>,
idx: impl Into<QuantumCell<F>>,
len: usize
) -> Vec<AssignedValue<F>>
sourcefn select_by_indicator<Q>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = Q>,
indicator: impl IntoIterator<Item = AssignedValue<F>>
) -> AssignedValue<F>where
Q: Into<QuantumCell<F>>,
fn select_by_indicator<Q>(
&self,
ctx: &mut Context<F>,
a: impl IntoIterator<Item = Q>,
indicator: impl IntoIterator<Item = AssignedValue<F>>
) -> AssignedValue<F>where
Q: Into<QuantumCell<F>>,
a and indicator and returns a[idx] (e.g. the value of a at idx). Read moresourcefn select_from_idx<Q>(
&self,
ctx: &mut Context<F>,
cells: impl IntoIterator<Item = Q>,
idx: impl Into<QuantumCell<F>>
) -> AssignedValue<F>where
Q: Into<QuantumCell<F>>,
fn select_from_idx<Q>(
&self,
ctx: &mut Context<F>,
cells: impl IntoIterator<Item = Q>,
idx: impl Into<QuantumCell<F>>
) -> AssignedValue<F>where
Q: Into<QuantumCell<F>>,
sourcefn is_zero(&self, ctx: &mut Context<F>, a: AssignedValue<F>) -> AssignedValue<F>
fn is_zero(&self, ctx: &mut Context<F>, a: AssignedValue<F>) -> AssignedValue<F>
sourcefn is_equal(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
fn is_equal(
&self,
ctx: &mut Context<F>,
a: impl Into<QuantumCell<F>>,
b: impl Into<QuantumCell<F>>
) -> AssignedValue<F>
1 if a = b, otherwise 0. Read moresourcefn lagrange_and_eval(
&self,
ctx: &mut Context<F>,
coords: &[(AssignedValue<F>, AssignedValue<F>)],
x: AssignedValue<F>
) -> (AssignedValue<F>, AssignedValue<F>)
fn lagrange_and_eval(
&self,
ctx: &mut Context<F>,
coords: &[(AssignedValue<F>, AssignedValue<F>)],
x: AssignedValue<F>
) -> (AssignedValue<F>, AssignedValue<F>)
coords and evaluates the resulting polynomial at x. Read moreAuto Trait Implementations
impl<F> RefUnwindSafe for GateChip<F>where
F: RefUnwindSafe,
impl<F> Send for GateChip<F>
impl<F> Sync for GateChip<F>
impl<F> Unpin for GateChip<F>where
F: Unpin,
impl<F> UnwindSafe for GateChip<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> FmtForward for T
impl<T> FmtForward for T
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read morefn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read morefn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
self, then passes self.as_ref() into the pipe function.fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
self, then passes self.deref() into the pipe function.impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Tap for T
impl<T> Tap for T
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
Borrow<B> of a value. Read morefn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
BorrowMut<B> of a value. Read morefn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
AsRef<R> view of a value. Read morefn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
AsMut<R> view of a value. Read morefn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
Deref::Target of a value. Read morefn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Deref::Target of a value. Read morefn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds. Read morefn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
.tap_borrow() only in debug builds, and is erased in release
builds. Read morefn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
.tap_borrow_mut() only in debug builds, and is erased in release
builds. Read morefn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
.tap_ref() only in debug builds, and is erased in release
builds. Read morefn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
.tap_ref_mut() only in debug builds, and is erased in release
builds. Read more