pub enum ExpressionNode<F: Field, E: ExpressionType<F>> {
Constant(F),
Selector(MleIndex<F>, Box<ExpressionNode<F, E>>, Box<ExpressionNode<F, E>>),
Mle(E::MLENodeRepr),
Sum(Box<ExpressionNode<F, E>>, Box<ExpressionNode<F, E>>),
Product(Vec<E::MLENodeRepr>),
Scaled(Box<ExpressionNode<F, E>>, F),
}Expand description
ExpressionNode can be made up of the following:
- ExpressionNode::Constant, i.e. + c for c \in \mathbb{F}
- ExpressionNode::Mle, i.e. \widetilde{V}{j > i}(b_1, …, b{m \leq n})
- ExpressionNode::Product, i.e. \prod_j \widetilde{V}{j > i}(b_1, …, b{m \leq n})
- ExpressionNode::Selector, i.e. (1 - b_0) * Expr(b_1, …, b_{m \leq n}) + b_0 * Expr(b_1, …, b_{m \leq n})
- ExpressionNode::Sum, i.e. \widetilde{V}{j_1 > i}(b_1, …, b{m_1 \leq n}) + \widetilde{V}{j_2 > i}(b_1, …, b{m_2 \leq n})
- ExpressionNode::Scaled, i.e. c * Expr(b_1, …, b_{m \leq n}) for c \in mathbb{F}
Variants§
Constant(F)
See documentation for ExpressionNode. Note that ExpressionNode::Constant can be an expression tree’s leaf.
Selector(MleIndex<F>, Box<ExpressionNode<F, E>>, Box<ExpressionNode<F, E>>)
See documentation for ExpressionNode.
Mle(E::MLENodeRepr)
An ExpressionNode representing the leaf of an expression tree which is actually mathematically defined as a multilinear extension.
Sum(Box<ExpressionNode<F, E>>, Box<ExpressionNode<F, E>>)
See documentation for ExpressionNode.
Product(Vec<E::MLENodeRepr>)
The product of several multilinear extension functions. This is also an expression tree’s leaf.
Scaled(Box<ExpressionNode<F, E>>, F)
See documentation for ExpressionNode.
Implementations§
Source§impl<F: Field> ExpressionNode<F, ExprDescription>
impl<F: Field> ExpressionNode<F, ExprDescription>
Sourcepub fn into_verifier_node(
&self,
point: &[F],
transcript_reader: &mut impl VerifierTranscript<F>,
) -> Result<ExpressionNode<F, VerifierExpr>>
pub fn into_verifier_node( &self, point: &[F], transcript_reader: &mut impl VerifierTranscript<F>, ) -> Result<ExpressionNode<F, VerifierExpr>>
Turn this expression into a VerifierExpr which represents a fully bound expression. Should only be applicable after a full layer of sumcheck.
Sourcepub fn compute_bookkeeping_table(
&self,
circuit_map: &CircuitEvalMap<F>,
) -> Option<MultilinearExtension<F>>
pub fn compute_bookkeeping_table( &self, circuit_map: &CircuitEvalMap<F>, ) -> Option<MultilinearExtension<F>>
Compute the expression-wise bookkeeping table (coefficients of the MLE representing the expression) for a given ExprDescription. This uses a CircuitEvalMap in order to grab the correct data corresponding to the MleDescription.
Sourcepub fn reduce<T>(
&self,
constant: &mut impl FnMut(F) -> T,
selector_column: &mut impl FnMut(&MleIndex<F>, T, T) -> T,
mle_eval: &mut impl FnMut(&<ExprDescription as ExpressionType<F>>::MLENodeRepr) -> T,
sum: &mut impl FnMut(T, T) -> T,
product: &mut impl FnMut(&[<ExprDescription as ExpressionType<F>>::MLENodeRepr]) -> T,
scaled: &mut impl FnMut(T, F) -> T,
) -> T
pub fn reduce<T>( &self, constant: &mut impl FnMut(F) -> T, selector_column: &mut impl FnMut(&MleIndex<F>, T, T) -> T, mle_eval: &mut impl FnMut(&<ExprDescription as ExpressionType<F>>::MLENodeRepr) -> T, sum: &mut impl FnMut(T, T) -> T, product: &mut impl FnMut(&[<ExprDescription as ExpressionType<F>>::MLENodeRepr]) -> T, scaled: &mut impl FnMut(T, F) -> T, ) -> T
Evaluate the polynomial using the provided closures to perform the operations.
Sourcepub fn get_all_nonlinear_rounds(
&self,
curr_nonlinear_indices: &mut Vec<usize>,
_mle_vec: &<ExprDescription as ExpressionType<F>>::MleVec,
) -> Vec<usize>
pub fn get_all_nonlinear_rounds( &self, curr_nonlinear_indices: &mut Vec<usize>, _mle_vec: &<ExprDescription as ExpressionType<F>>::MleVec, ) -> Vec<usize>
Traverse an expression tree in order and returns a vector of indices of all the nonlinear rounds in an expression (in no particular order).
Sourcepub(crate) fn get_all_rounds(
&self,
curr_indices: &mut Vec<usize>,
_mle_vec: &<ExprDescription as ExpressionType<F>>::MleVec,
) -> Vec<usize>
pub(crate) fn get_all_rounds( &self, curr_indices: &mut Vec<usize>, _mle_vec: &<ExprDescription as ExpressionType<F>>::MleVec, ) -> Vec<usize>
This function traverses an expression tree in order to determine what are the labels for the variables in the expression.
Sourcepub fn get_circuit_mles(&self) -> Vec<&MleDescription<F>>
pub fn get_circuit_mles(&self) -> Vec<&MleDescription<F>>
Get all the MleDescriptions, recursively, for this expression by adding the MLEs in the leaves into the vector of MleDescriptions.
Sourcepub fn index_mle_vars(&mut self, start_index: usize)
pub fn index_mle_vars(&mut self, start_index: usize)
Label the MLE indices of an expression, starting from the start_index.
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 ExpressionNode<F, ProverExpr> recursively, for this expression.
Sourcepub fn get_post_sumcheck_layer(
&self,
multiplier: F,
challenges: &[F],
_mle_vec: &<VerifierExpr as ExpressionType<F>>::MleVec,
) -> PostSumcheckLayer<F, Option<F>>
pub fn get_post_sumcheck_layer( &self, multiplier: F, challenges: &[F], _mle_vec: &<VerifierExpr as ExpressionType<F>>::MleVec, ) -> PostSumcheckLayer<F, Option<F>>
Recursively get the PostSumcheckLayer for an Expression node, which is the fully bound representation of an expression. Relevant for the Hyrax IP, where we need commitments to fully bound MLEs as well as their intermediate products.
Sourcefn get_max_degree(
&self,
_mle_vec: &<ExprDescription as ExpressionType<F>>::MleVec,
) -> usize
fn get_max_degree( &self, _mle_vec: &<ExprDescription as ExpressionType<F>>::MleVec, ) -> usize
Get the maximum degree of an ExpressionNode, recursively.
Sourcefn get_num_vars(&self) -> usize
fn get_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.
Source§impl<F: Field, E: ExpressionType<F>> ExpressionNode<F, E>
Generic helper methods shared across all types of ExpressionNodes.
impl<F: Field, E: ExpressionType<F>> ExpressionNode<F, E>
Generic helper methods shared across all types of ExpressionNodes.
Sourcepub fn traverse_node(
&self,
observer_fn: &mut impl FnMut(&ExpressionNode<F, E>, &E::MleVec) -> Result<()>,
mle_vec: &E::MleVec,
) -> Result<()>
pub fn traverse_node( &self, observer_fn: &mut impl FnMut(&ExpressionNode<F, E>, &E::MleVec) -> Result<()>, mle_vec: &E::MleVec, ) -> Result<()>
traverse the expression tree, and applies the observer_fn to all child node / the mle_vec reference
Sourcepub fn traverse_node_mut(
&mut self,
observer_fn: &mut impl FnMut(&mut ExpressionNode<F, E>, &mut E::MleVec) -> Result<()>,
mle_vec: &mut E::MleVec,
) -> Result<()>
pub fn traverse_node_mut( &mut self, observer_fn: &mut impl FnMut(&mut ExpressionNode<F, E>, &mut E::MleVec) -> Result<()>, mle_vec: &mut E::MleVec, ) -> Result<()>
similar to traverse, but allows mutation of self (expression node and mle_vec)
Source§impl<F: Field> ExpressionNode<F, ProverExpr>
impl<F: Field> ExpressionNode<F, ProverExpr>
Sourcepub fn transform_to_verifier_expression_node(
&mut self,
mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
) -> Result<ExpressionNode<F, VerifierExpr>>
pub fn transform_to_verifier_expression_node( &mut self, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> Result<ExpressionNode<F, VerifierExpr>>
Transforms the expression to a verifier expression should only be called when no variables are bound in the expression. Traverses the expression and changes the DenseMle to MleDescription.
Sourcepub fn fix_variable_node(
&mut self,
round_index: usize,
challenge: F,
mle_vec: &mut <ProverExpr as ExpressionType<F>>::MleVec,
)
pub fn fix_variable_node( &mut self, round_index: usize, challenge: F, mle_vec: &mut <ProverExpr as ExpressionType<F>>::MleVec, )
fix the variable at a certain round index, always the most significant index.
Sourcepub fn fix_variable_at_index_node(
&mut self,
round_index: usize,
challenge: F,
mle_vec: &mut <ProverExpr as ExpressionType<F>>::MleVec,
)
pub fn fix_variable_at_index_node( &mut self, round_index: usize, challenge: F, mle_vec: &mut <ProverExpr as ExpressionType<F>>::MleVec, )
fix the variable at a certain round index, can be arbitrary indices.
pub fn evaluate_sumcheck_node_beta_cascade_sum( &self, beta_values: &BetaValues<F>, round_index: usize, degree: usize, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> SumcheckEvals<F>
Sourcepub fn evaluate_sumcheck_node_beta_cascade(
&self,
beta_vec: &[&BetaValues<F>],
mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
random_coefficients: &[F],
round_index: usize,
degree: usize,
) -> SumcheckEvals<F>
pub fn evaluate_sumcheck_node_beta_cascade( &self, beta_vec: &[&BetaValues<F>], mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, random_coefficients: &[F], round_index: usize, degree: usize, ) -> SumcheckEvals<F>
This is the function to compute a single-round sumcheck message using the beta cascade algorithm.
§Arguments
expr: the ExpressionPdefining a GKR layer. The caller is expected to have already fixed the variables of previous rounds.round_index: the MLE index corresponding to the variable that is going to be the independent variable for this round. The caller is expected to have already fixed variables1 .. (round_index - 1)in expressionPto the verifier’s challanges.max_degree: the degree of the polynomial to be exchanged in this round’s sumcheck message.beta_value: thebetafunction associated with expressionexp. It is the caller’s responsibility to keep this consistent withexprbefore/after each call.
In particular, if round_index == k, and the current GKR layer expression
was originally on n variables, expr is expected to represent a
polynomial expression on n - k + 1 variables: P(r_1, r_2, ..., r_{k-1}, x_k, x_{k+1}, ..., x_n): F^{n - k + 1} -> F, with the first k - 1 free
variables already fixed to random challenges r_1, ..., r_{k-1}. Similarly,
beta_values should represent the polynomial: \beta(r_1, ..., r_{k-1}, b_k, ..., b_n, g_1, ..., g_n) whose unbound variables are b_k, ..., b_n.
§Returns
If successful, this functions returns a representation of the univariate polynomial:
g_{round_index}(x) =
\sum_{b_{k+1} \in {0, 1}}
\sum_{b_{k+2} \in {0, 1}}
...
\sum_{b_{n} \in {0, 1}}
\beta(r_1, ..., r_k, x, b_{k+1}, ..., b_{n}, g_1, ..., g_n)
* P(r_1, ..., r_k, x, b_{k+1}, ..., b_n)- This function should be responsible for mutating
exprandbeta_valuesby fixing variables (if any) after the sumcheck round. It should maintain the invariant thatexprandbeta_valuesare consistent with each other! max_degreeshould NOT be the caller’s responsibility to compute. The degree should be determined throughexprandround_index. It is error-prone to allow for sumcheck message to go through with an arbitrary degree.
§Beta cascade
Instead of using a beta table to linearize an expression, we utilize the fact that for each specific node in an expression tree, we only need exactly the beta values corresponding to the indices present in that node.
Sourcepub fn index_mle_indices_node(
&mut self,
curr_index: usize,
mle_vec: &mut <ProverExpr as ExpressionType<F>>::MleVec,
) -> usize
pub fn index_mle_indices_node( &mut self, curr_index: usize, mle_vec: &mut <ProverExpr as ExpressionType<F>>::MleVec, ) -> 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(crate) fn get_all_rounds(
&self,
mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
) -> Vec<usize>
pub(crate) fn get_all_rounds( &self, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> Vec<usize>
this traverses the expression to get all of the rounds, in total. requires going through each of the nodes and collecting the leaf node indices.
Sourcepub fn get_all_nonlinear_rounds(
&self,
mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
) -> Vec<usize>
pub fn get_all_nonlinear_rounds( &self, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> Vec<usize>
traverse an expression tree in order to get all of the nonlinear rounds in an expression.
Sourcepub fn get_all_linear_rounds(
&self,
mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
) -> Vec<usize>
pub fn get_all_linear_rounds( &self, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> Vec<usize>
get all of the linear rounds from an expression tree
fn get_rounds_helper( &self, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> Vec<usize>
Sourcepub fn get_expression_num_free_variables_node(
&self,
curr_size: usize,
mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
) -> usize
pub fn get_expression_num_free_variables_node( &self, curr_size: usize, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> usize
Gets the number of free variables in an expression.
Sourcepub fn get_post_sumcheck_layer(
&self,
multiplier: F,
mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
) -> PostSumcheckLayer<F, F>
pub fn get_post_sumcheck_layer( &self, multiplier: F, mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> PostSumcheckLayer<F, F>
Recursively get the PostSumcheckLayer for an Expression node, which is the fully bound representation of an expression. Relevant for the Hyrax IP, where we need commitments to fully bound MLEs as well as their intermediate products.
Sourcefn get_max_degree(
&self,
_mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec,
) -> usize
fn get_max_degree( &self, _mle_vec: &<ProverExpr as ExpressionType<F>>::MleVec, ) -> usize
Get the maximum degree of an ExpressionNode, recursively.
Source§impl<F: Field> ExpressionNode<F, VerifierExpr>
impl<F: Field> ExpressionNode<F, VerifierExpr>
Sourcepub fn reduce<T>(
&self,
constant: &impl Fn(F) -> T,
selector_column: &impl Fn(&MleIndex<F>, T, T) -> T,
mle_eval: &impl Fn(&<VerifierExpr as ExpressionType<F>>::MLENodeRepr) -> T,
sum: &impl Fn(T, T) -> T,
product: &impl Fn(&[<VerifierExpr as ExpressionType<F>>::MLENodeRepr]) -> T,
scaled: &impl Fn(T, F) -> T,
) -> T
pub fn reduce<T>( &self, constant: &impl Fn(F) -> T, selector_column: &impl Fn(&MleIndex<F>, T, T) -> T, mle_eval: &impl Fn(&<VerifierExpr as ExpressionType<F>>::MLENodeRepr) -> T, sum: &impl Fn(T, T) -> T, product: &impl Fn(&[<VerifierExpr as ExpressionType<F>>::MLENodeRepr]) -> T, scaled: &impl Fn(T, F) -> T, ) -> T
Evaluate the polynomial using the provided closures to perform the operations.
Sourcepub fn get_all_nonlinear_rounds(
&self,
curr_nonlinear_indices: &mut Vec<usize>,
_mle_vec: &<VerifierExpr as ExpressionType<F>>::MleVec,
) -> Vec<usize>
pub fn get_all_nonlinear_rounds( &self, curr_nonlinear_indices: &mut Vec<usize>, _mle_vec: &<VerifierExpr as ExpressionType<F>>::MleVec, ) -> Vec<usize>
Traverse an expression tree in order and returns a vector of indices of all the nonlinear rounds in an expression (in no particular order).
Trait Implementations§
Source§impl<F: Clone + Field, E: Clone + ExpressionType<F>> Clone for ExpressionNode<F, E>where
E::MLENodeRepr: Clone,
impl<F: Clone + Field, E: Clone + ExpressionType<F>> Clone for ExpressionNode<F, E>where
E::MLENodeRepr: Clone,
Source§fn clone(&self) -> ExpressionNode<F, E>
fn clone(&self) -> ExpressionNode<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 ExpressionNode<F, ExprDescription>
impl<F: Debug + Field> Debug for ExpressionNode<F, ExprDescription>
Source§impl<F: Debug + Field> Debug for ExpressionNode<F, ProverExpr>
impl<F: Debug + Field> Debug for ExpressionNode<F, ProverExpr>
Source§impl<F: Debug + Field> Debug for ExpressionNode<F, VerifierExpr>
impl<F: Debug + Field> Debug for ExpressionNode<F, VerifierExpr>
Source§impl<'de, F, E: ExpressionType<F>> Deserialize<'de> for ExpressionNode<F, E>where
F: Field,
impl<'de, F, E: ExpressionType<F>> Deserialize<'de> for ExpressionNode<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 ExpressionNode<F, E>where
E::MLENodeRepr: Hash,
impl<F: Hash + Field, E: Hash + ExpressionType<F>> Hash for ExpressionNode<F, E>where
E::MLENodeRepr: Hash,
Source§impl<F: PartialEq + Field, E: PartialEq + ExpressionType<F>> PartialEq for ExpressionNode<F, E>where
E::MLENodeRepr: PartialEq,
impl<F: PartialEq + Field, E: PartialEq + ExpressionType<F>> PartialEq for ExpressionNode<F, E>where
E::MLENodeRepr: PartialEq,
Source§impl<F, E: ExpressionType<F>> Serialize for ExpressionNode<F, E>where
F: Field,
impl<F, E: ExpressionType<F>> Serialize for ExpressionNode<F, E>where
F: Field,
impl<F: Eq + Field, E: Eq + ExpressionType<F>> Eq for ExpressionNode<F, E>where
E::MLENodeRepr: Eq,
impl<F: Field, E: ExpressionType<F>> StructuralPartialEq for ExpressionNode<F, E>
Auto Trait Implementations§
impl<F, E> Freeze for ExpressionNode<F, E>
impl<F, E> RefUnwindSafe for ExpressionNode<F, E>
impl<F, E> Send for ExpressionNode<F, E>
impl<F, E> Sync for ExpressionNode<F, E>
impl<F, E> Unpin for ExpressionNode<F, E>
impl<F, E> UnwindSafe for ExpressionNode<F, E>
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.