pub struct Expression<F: Field, E: ExpressionType<F>> {
pub expression_node: ExpressionNode<F, E>,
pub mle_vec: E::MleVec,
}Expand description
The high-level idea is that an Expression is generic over ExpressionType , and contains within it a single parent ExpressionNode as well as an ExpressionType::MleVec containing the unique leaf representations for the leaves of the ExpressionNode tree.
Fields§
§expression_node: ExpressionNode<F, E>The root of the expression “tree”.
mle_vec: E::MleVecThe unique owned copies of all MLEs which are “leaves” within the expression “tree”.
Implementations§
Source§impl<F: Field> Expression<F, ExprDescription>
impl<F: Field> Expression<F, ExprDescription>
Sourcepub fn bind(
&self,
point: &[F],
transcript_reader: &mut impl VerifierTranscript<F>,
) -> Result<Expression<F, VerifierExpr>>
pub fn bind( &self, point: &[F], transcript_reader: &mut impl VerifierTranscript<F>, ) -> Result<Expression<F, VerifierExpr>>
Binds the variables of this expression to point, and retrieves the
leaf MLE values from the transcript_reader. Returns a Expression<F, VerifierExpr> version of self.
Sourcepub fn from_mle_desc(mle_desc: MleDescription<F>) -> Self
pub fn from_mle_desc(mle_desc: MleDescription<F>) -> Self
Convenience function which creates a trivial Expression<F, ExprDescription> referring to a single MLE.
Sourcepub fn get_all_nonlinear_rounds(&self) -> Vec<usize>
pub fn get_all_nonlinear_rounds(&self) -> Vec<usize>
Traverses the expression tree to get the indices of all the nonlinear rounds. Returns a sorted vector of indices.
Sourcepub fn get_all_rounds(&self) -> Vec<usize>
pub fn get_all_rounds(&self) -> Vec<usize>
Traverses the expression tree to return all indices within the expression. Can only be used after indexing the expression.
Sourcepub fn get_circuit_mles(&self) -> Vec<&MleDescription<F>>
pub fn get_circuit_mles(&self) -> Vec<&MleDescription<F>>
Get the MleDescriptions for this expression, which are at the leaves of the expression.
Sourcepub fn index_mle_vars(&mut self, start_index: usize)
pub fn index_mle_vars(&mut self, start_index: usize)
Label the free variables in an expression.
Sourcepub fn into_prover_expression(
&self,
circuit_map: &CircuitEvalMap<F>,
) -> Expression<F, ProverExpr>
pub fn into_prover_expression( &self, circuit_map: &CircuitEvalMap<F>, ) -> Expression<F, ProverExpr>
Get the Expression<F, ProverExpr> corresponding to this Expression<F, ExprDescription> using the associated data in the CircuitEvalMap.
Sourcepub fn get_post_sumcheck_layer(
&self,
multiplier: F,
challenges: &[F],
) -> PostSumcheckLayer<F, Option<F>>
pub fn get_post_sumcheck_layer( &self, multiplier: F, challenges: &[F], ) -> PostSumcheckLayer<F, Option<F>>
Get the PostSumcheckLayer for this expression, which represents the fully bound values of the expression. Relevant for the Hyrax IP, where we need commitments to fully bound MLEs as well as their intermediate products.
Sourcepub fn get_max_degree(&self) -> usize
pub fn get_max_degree(&self) -> usize
Get the maximum degree of any variable in this expression.
Sourcepub fn get_round_degree(&self, curr_round: usize) -> usize
pub fn get_round_degree(&self, curr_round: usize) -> usize
Returns the maximum degree of b_{curr_round} within an expression (and therefore the number of prover messages we need to send)
Source§impl<F: Field> Expression<F, ExprDescription>
impl<F: Field> Expression<F, ExprDescription>
Sourcepub fn num_vars(&self) -> usize
pub fn num_vars(&self) -> usize
Returns the total number of variables (i.e. number of rounds of sumcheck) within the MLE representing the output “data” of this particular expression.
Note that unlike within the AbstractExpr case, we don’t need to return
a Result since all MLEs within a ExprDescription are instantiated with their appropriate number of variables.
Sourcepub fn products(circuit_mle_descs: Vec<MleDescription<F>>) -> Self
pub fn products(circuit_mle_descs: Vec<MleDescription<F>>) -> Self
Creates an Expression<F, ExprDescription> which describes the polynomial relationship
circuit_mle_descs[0](x_1, ..., x_{n_0}) * circuit_mle_descs[1](x_1, ..., x_{n_1}) * ...
Sourcepub fn select(self, rhs: Expression<F, ExprDescription>) -> Self
pub fn select(self, rhs: Expression<F, ExprDescription>) -> Self
Creates an Expression<F, ExprDescription> which describes the polynomial relationship
(1 - x_0) * Self(x_1, ..., x_{n_lhs}) + b_0 * rhs(x_1, ..., x_{n_rhs})
NOTE that by default, performing a select() over an LHS and an RHS
with different numbers of variables will create a selector tree such that
the side with fewer variables always falls down the left-most side of
that subtree.
For example, if we are calling select() on two MLEs,
V_i(x_0, …, x_4) and V_i(x_0, …, x_6)
then the resulting expression will have a single top-level selector, and
will forcibly move the first MLE (with two fewer variables) to the left-most
subtree with 5 variables:
(1 - x_0) * (1 - x_1) * (1 - x_2) * V_i(x_3, …, x_7) +
x_0 * V_i(x_1, …, x_7)
Sourcepub fn binary_tree_selector(expressions: Vec<Self>) -> Self
pub fn binary_tree_selector(expressions: Vec<Self>) -> Self
Create a nested selector Expression that selects between 2^k Expressions by creating a binary tree of Selector Expressions. The order of the leaves is the order of the input expressions. (Note that this is very different from calling Self::select consecutively.)
Sourcepub fn scaled(expression: Expression<F, ExprDescription>, scale: F) -> Self
pub fn scaled(expression: Expression<F, ExprDescription>, scale: F) -> Self
scales an Expression by a field element
Source§impl<F: Field, E: ExpressionType<F>> Expression<F, E>
generic methods shared across all types of expressions
impl<F: Field, E: ExpressionType<F>> Expression<F, E>
generic methods shared across all types of expressions
Sourcepub fn new(expression_node: ExpressionNode<F, E>, mle_vec: E::MleVec) -> Self
pub fn new(expression_node: ExpressionNode<F, E>, mle_vec: E::MleVec) -> Self
Create a new expression
Sourcepub fn deconstruct_ref(&self) -> (&ExpressionNode<F, E>, &E::MleVec)
pub fn deconstruct_ref(&self) -> (&ExpressionNode<F, E>, &E::MleVec)
Returns a reference to the internal expression_node and mle_vec fields.
Sourcepub fn deconstruct_mut(&mut self) -> (&mut ExpressionNode<F, E>, &mut E::MleVec)
pub fn deconstruct_mut(&mut self) -> (&mut ExpressionNode<F, E>, &mut E::MleVec)
Returns a mutable reference to the expression_node and mle_vec
present within the given Expression.
Sourcepub fn deconstruct(self) -> (ExpressionNode<F, E>, E::MleVec)
pub fn deconstruct(self) -> (ExpressionNode<F, E>, E::MleVec)
Takes ownership of the Expression and returns the owned values to its
internal expression_node and mle_vec.
Sourcepub fn traverse(
&self,
observer_fn: &mut impl FnMut(&ExpressionNode<F, E>, &E::MleVec) -> Result<()>,
) -> Result<()>
pub fn traverse( &self, observer_fn: &mut impl FnMut(&ExpressionNode<F, E>, &E::MleVec) -> Result<()>, ) -> Result<()>
traverse the expression tree, and applies the observer_fn to all child node because the expression node has the recursive structure, the traverse_node helper function is implemented on it, with the mle_vec reference passed in
Sourcepub fn traverse_mut(
&mut self,
observer_fn: &mut impl FnMut(&mut ExpressionNode<F, E>, &mut E::MleVec) -> Result<()>,
) -> Result<()>
pub fn traverse_mut( &mut self, observer_fn: &mut impl FnMut(&mut ExpressionNode<F, E>, &mut E::MleVec) -> Result<()>, ) -> Result<()>
similar to traverse, but allows mutation of self (expression node and mle_vec)
Source§impl<F: Field> Expression<F, ProverExpr>
this is what the prover manipulates to prove the correctness of the computation.
Methods here include ones to fix bits, evaluate sumcheck messages, etc.
impl<F: Field> Expression<F, ProverExpr>
this is what the prover manipulates to prove the correctness of the computation. Methods here include ones to fix bits, evaluate sumcheck messages, etc.
Sourcepub fn select(self, rhs: Expression<F, ProverExpr>) -> Self
pub fn select(self, rhs: Expression<F, ProverExpr>) -> Self
See documentation in super::circuit_expr::ExprDescription’s select()
function for more details!
Sourcepub fn pow(pow: usize, mle: DenseMle<F>) -> Self
pub fn pow(pow: usize, mle: DenseMle<F>) -> Self
Create a product Expression that raises one MLE to a given power
Sourcepub fn products(product_list: <ProverExpr as ExpressionType<F>>::MleVec) -> Self
pub fn products(product_list: <ProverExpr as ExpressionType<F>>::MleVec) -> Self
Create a product Expression that multiplies many MLEs together
Sourcepub fn constant(constant: F) -> Self
pub fn constant(constant: F) -> Self
Create a constant Expression that contains one field element
Sourcepub fn scaled(expression: Expression<F, ProverExpr>, scale: F) -> Self
pub fn scaled(expression: Expression<F, ProverExpr>, scale: F) -> Self
scales an Expression by a field element
Sourcepub fn increment_mle_vec_indices(&mut self, offset: usize)
pub fn increment_mle_vec_indices(&mut self, offset: usize)
which increments all the MleVecIndex in the expression by param amount
Sourcepub fn transform_to_verifier_expression(
self,
) -> Result<Expression<F, VerifierExpr>>
pub fn transform_to_verifier_expression( self, ) -> Result<Expression<F, VerifierExpr>>
Transforms the prover expression to a verifier expression.
Should only be called when the entire expression is fully bound.
Traverses the expression and changes the DenseMle to VerifierMle, by grabbing their bookkeeping table’s 1st and only element.
If the bookkeeping table has more than 1 element, it throws an ExpressionError::EvaluateNotFullyBoundError
Sourcepub fn fix_variable(&mut self, round_index: usize, challenge: F)
pub fn fix_variable(&mut self, round_index: usize, challenge: F)
fix the variable at a certain round index, always MSB index
Sourcepub fn fix_variable_at_index(&mut self, round_index: usize, challenge: F)
pub fn fix_variable_at_index(&mut self, round_index: usize, challenge: F)
fix the variable at a certain round index, arbitrary index
Sourcepub fn evaluate_expr(&mut self, challenges: Vec<F>) -> Result<F>
pub fn evaluate_expr(&mut self, challenges: Vec<F>) -> Result<F>
evaluates an expression on the given challenges points, by fixing the variables
Sourcepub fn evaluate_sumcheck_beta_cascade(
&self,
beta: &[&BetaValues<F>],
random_coefficients: &[F],
round_index: usize,
degree: usize,
) -> SumcheckEvals<F>
pub fn evaluate_sumcheck_beta_cascade( &self, beta: &[&BetaValues<F>], random_coefficients: &[F], round_index: usize, degree: usize, ) -> SumcheckEvals<F>
This evaluates a sumcheck message using the beta cascade algorithm by calling it on the root
node of the expression tree. This assumes that there is an independent variable in the
expression, which is the round_index.
Sourcepub fn evaluate_sumcheck_node_beta_cascade_sum(
&self,
beta_values: &BetaValues<F>,
round_index: usize,
degree: usize,
) -> SumcheckEvals<F>
pub fn evaluate_sumcheck_node_beta_cascade_sum( &self, beta_values: &BetaValues<F>, round_index: usize, degree: usize, ) -> SumcheckEvals<F>
This evaluates a sumcheck message using the beta cascade algorithm, taking the sum
of the expression over all the variables round_index and after. For the variables
before, we compute the fully bound beta equality MLE and scale the rest of the sum
by this value.
Sourcepub fn get_all_rounds(&self) -> Vec<usize>
pub fn get_all_rounds(&self) -> Vec<usize>
Traverses the expression tree to return all indices within the expression. Can only be used after indexing the expression.
Sourcepub fn get_all_nonlinear_rounds(&self) -> Vec<usize>
pub fn get_all_nonlinear_rounds(&self) -> Vec<usize>
this traverses the expression tree to get all of the nonlinear rounds. can only be used after indexing the expression. returns the indices sorted.
Sourcepub fn get_all_linear_rounds(&self) -> Vec<usize>
pub fn get_all_linear_rounds(&self) -> Vec<usize>
this traverses the expression tree to get all of the linear rounds. can only be used after indexing the expression. returns the indices sorted.
Sourcepub fn index_mle_indices(&mut self, curr_index: usize) -> usize
pub fn index_mle_indices(&mut self, curr_index: usize) -> usize
Mutate the MLE indices that are MleIndex::Free in the expression and turn them into MleIndex::Indexed. Returns the max number of bits that are indexed.
Sourcepub fn get_expression_num_free_variables(&self) -> usize
pub fn get_expression_num_free_variables(&self) -> usize
Gets the number of free variables in an expression.
Sourcepub fn get_post_sumcheck_layer(&self, multiplier: F) -> PostSumcheckLayer<F, F>
pub fn get_post_sumcheck_layer(&self, multiplier: F) -> PostSumcheckLayer<F, F>
Get the PostSumcheckLayer for this expression, which represents the fully bound values of the expression. Relevant for the Hyrax IP, where we need commitments to fully bound MLEs as well as their intermediate products.
Sourcepub fn get_max_degree(&self) -> usize
pub fn get_max_degree(&self) -> usize
Get the maximum degree of any variable in htis expression
Source§impl<F: Field> Expression<F, VerifierExpr>
impl<F: Field> Expression<F, VerifierExpr>
Sourcepub fn mle(mle: VerifierMle<F>) -> Self
pub fn mle(mle: VerifierMle<F>) -> Self
Create a mle Expression that contains one MLE
Sourcepub fn get_all_nonlinear_rounds(&mut self) -> Vec<usize>
pub fn get_all_nonlinear_rounds(&mut self) -> Vec<usize>
Traverses the expression tree to get the indices of all the nonlinear rounds. Returns a sorted vector of indices.
Trait Implementations§
Source§impl<F: Field> Add for Expression<F, ExprDescription>
implement the Add, Sub, and Mul traits for the Expression
impl<F: Field> Add for Expression<F, ExprDescription>
implement the Add, Sub, and Mul traits for the Expression
Source§type Output = Expression<F, ExprDescription>
type Output = Expression<F, ExprDescription>
+ operator.Source§fn add(
self,
rhs: Expression<F, ExprDescription>,
) -> Expression<F, ExprDescription>
fn add( self, rhs: Expression<F, ExprDescription>, ) -> Expression<F, ExprDescription>
+ operation. Read moreSource§impl<F: Field> Add for Expression<F, ProverExpr>
implement the Add, Sub, and Mul traits for the Expression
impl<F: Field> Add for Expression<F, ProverExpr>
implement the Add, Sub, and Mul traits for the Expression
Source§type Output = Expression<F, ProverExpr>
type Output = Expression<F, ProverExpr>
+ operator.Source§fn add(self, rhs: Expression<F, ProverExpr>) -> Expression<F, ProverExpr>
fn add(self, rhs: Expression<F, ProverExpr>) -> Expression<F, ProverExpr>
+ operation. Read moreSource§impl<F: Clone + Field, E: Clone + ExpressionType<F>> Clone for Expression<F, E>
impl<F: Clone + Field, E: Clone + ExpressionType<F>> Clone for Expression<F, E>
Source§fn clone(&self) -> Expression<F, E>
fn clone(&self) -> Expression<F, E>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<F: Debug + Field> Debug for Expression<F, ExprDescription>
impl<F: Debug + Field> Debug for Expression<F, ExprDescription>
Source§impl<F: Debug + Field> Debug for Expression<F, ProverExpr>
impl<F: Debug + Field> Debug for Expression<F, ProverExpr>
Source§impl<F: Debug + Field> Debug for Expression<F, VerifierExpr>
impl<F: Debug + Field> Debug for Expression<F, VerifierExpr>
Source§impl<'de, F, E: ExpressionType<F>> Deserialize<'de> for Expression<F, E>where
F: Field,
impl<'de, F, E: ExpressionType<F>> Deserialize<'de> for Expression<F, E>where
F: Field,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<F: Hash + Field, E: Hash + ExpressionType<F>> Hash for Expression<F, E>
impl<F: Hash + Field, E: Hash + ExpressionType<F>> Hash for Expression<F, E>
Source§impl<F: Field> Mul<F> for Expression<F, ExprDescription>
impl<F: Field> Mul<F> for Expression<F, ExprDescription>
Source§type Output = Expression<F, ExprDescription>
type Output = Expression<F, ExprDescription>
* operator.Source§impl<F: Field> Mul<F> for Expression<F, ProverExpr>
impl<F: Field> Mul<F> for Expression<F, ProverExpr>
Source§type Output = Expression<F, ProverExpr>
type Output = Expression<F, ProverExpr>
* operator.Source§impl<F: Field> Neg for Expression<F, ExprDescription>
impl<F: Field> Neg for Expression<F, ExprDescription>
Source§type Output = Expression<F, ExprDescription>
type Output = Expression<F, ExprDescription>
- operator.Source§impl<F: Field> Neg for Expression<F, ProverExpr>
impl<F: Field> Neg for Expression<F, ProverExpr>
Source§type Output = Expression<F, ProverExpr>
type Output = Expression<F, ProverExpr>
- operator.Source§impl<F, E: ExpressionType<F>> Serialize for Expression<F, E>where
F: Field,
impl<F, E: ExpressionType<F>> Serialize for Expression<F, E>where
F: Field,
Source§impl<F: Field> Sub for Expression<F, ExprDescription>
impl<F: Field> Sub for Expression<F, ExprDescription>
Source§type Output = Expression<F, ExprDescription>
type Output = Expression<F, ExprDescription>
- operator.Source§fn sub(
self,
rhs: Expression<F, ExprDescription>,
) -> Expression<F, ExprDescription>
fn sub( self, rhs: Expression<F, ExprDescription>, ) -> Expression<F, ExprDescription>
- operation. Read moreSource§impl<F: Field> Sub for Expression<F, ProverExpr>
impl<F: Field> Sub for Expression<F, ProverExpr>
Source§type Output = Expression<F, ProverExpr>
type Output = Expression<F, ProverExpr>
- operator.Source§fn sub(self, rhs: Expression<F, ProverExpr>) -> Expression<F, ProverExpr>
fn sub(self, rhs: Expression<F, ProverExpr>) -> Expression<F, ProverExpr>
- operation. Read moreAuto Trait Implementations§
impl<F, E> Freeze for Expression<F, E>where
<E as ExpressionType<F>>::MleVec: Freeze,
F: Freeze,
<E as ExpressionType<F>>::MLENodeRepr: Freeze,
impl<F, E> RefUnwindSafe for Expression<F, E>where
<E as ExpressionType<F>>::MleVec: RefUnwindSafe,
F: RefUnwindSafe,
<E as ExpressionType<F>>::MLENodeRepr: RefUnwindSafe,
impl<F, E> Send for Expression<F, E>
impl<F, E> Sync for Expression<F, E>
impl<F, E> Unpin for Expression<F, E>where
<E as ExpressionType<F>>::MleVec: Unpin,
F: Unpin,
<E as ExpressionType<F>>::MLENodeRepr: Unpin,
impl<F, E> UnwindSafe for Expression<F, E>where
<E as ExpressionType<F>>::MleVec: UnwindSafe,
F: UnwindSafe,
<E as ExpressionType<F>>::MLENodeRepr: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for 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,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§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,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§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>
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>
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§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 more§fn 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 more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
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) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
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)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn 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.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.