Expression

Struct Expression 

Source
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::MleVec

The unique owned copies of all MLEs which are “leaves” within the expression “tree”.

Implementations§

Source§

impl<F: Field> Expression<F, ExprDescription>

Source

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.

Source

pub fn from_mle_desc(mle_desc: MleDescription<F>) -> Self

Convenience function which creates a trivial Expression<F, ExprDescription> referring to a single MLE.

Source

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.

Source

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.

Source

pub fn get_circuit_mles(&self) -> Vec<&MleDescription<F>>

Get the MleDescriptions for this expression, which are at the leaves of the expression.

Source

pub fn index_mle_vars(&mut self, start_index: usize)

Label the free variables in an expression.

Source

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.

Source

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.

Source

pub fn get_max_degree(&self) -> usize

Get the maximum degree of any variable in this expression.

Source

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>

Source

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.

Source

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}) * ...

Source

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)

Source

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.)

Source

pub fn constant(constant: F) -> Self

Literally just constant as a term, but as an “Expression

Source

pub fn negated(expression: Self) -> Self

Literally just -expression, as an “Expression

Source

pub fn sum(lhs: Self, rhs: Self) -> Self

Literally just lhs + rhs, as an “Expression

Source

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

Source

pub fn new(expression_node: ExpressionNode<F, E>, mle_vec: E::MleVec) -> Self

Create a new expression

Source

pub fn deconstruct_ref(&self) -> (&ExpressionNode<F, E>, &E::MleVec)

Returns a reference to the internal expression_node and mle_vec fields.

Source

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.

Source

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.

Source

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

Source

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.

Source

pub fn select(self, rhs: Expression<F, ProverExpr>) -> Self

See documentation in super::circuit_expr::ExprDescription’s select() function for more details!

Source

pub fn pow(pow: usize, mle: DenseMle<F>) -> Self

Create a product Expression that raises one MLE to a given power

Source

pub fn products(product_list: <ProverExpr as ExpressionType<F>>::MleVec) -> Self

Create a product Expression that multiplies many MLEs together

Source

pub fn mle(mle: DenseMle<F>) -> Self

Create a mle Expression that contains one MLE

Source

pub fn constant(constant: F) -> Self

Create a constant Expression that contains one field element

Source

pub fn negated(expression: Self) -> Self

negates an Expression

Source

pub fn sum(lhs: Self, rhs: Self) -> Self

Create a Sum Expression that contains two MLEs

Source

pub fn scaled(expression: Expression<F, ProverExpr>, scale: F) -> Self

scales an Expression by a field element

Source

pub fn num_mle(&self) -> usize

returns the number of MleRefs in the expression

Source

pub fn increment_mle_vec_indices(&mut self, offset: usize)

which increments all the MleVecIndex in the expression by param amount

Source

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

Source

pub fn fix_variable(&mut self, round_index: usize, challenge: F)

fix the variable at a certain round index, always MSB index

Source

pub fn fix_variable_at_index(&mut self, round_index: usize, challenge: F)

fix the variable at a certain round index, arbitrary index

Source

pub fn evaluate_expr(&mut self, challenges: Vec<F>) -> Result<F>

evaluates an expression on the given challenges points, by fixing the variables

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn get_expression_num_free_variables(&self) -> usize

Gets the number of free variables in an expression.

Source

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.

Source

pub fn get_max_degree(&self) -> usize

Get the maximum degree of any variable in htis expression

Source§

impl<F: Field> Expression<F, VerifierExpr>

Source

pub fn mle(mle: VerifierMle<F>) -> Self

Create a mle Expression that contains one MLE

Source

pub fn evaluate(&self) -> Result<F>

Evaluate this fully bound expression.

Source

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

Source§

type Output = Expression<F, ExprDescription>

The resulting type after applying the + operator.
Source§

fn add( self, rhs: Expression<F, ExprDescription>, ) -> Expression<F, ExprDescription>

Performs the + operation. Read more
Source§

impl<F: Field> Add for Expression<F, ProverExpr>

implement the Add, Sub, and Mul traits for the Expression

Source§

type Output = Expression<F, ProverExpr>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Expression<F, ProverExpr>) -> Expression<F, ProverExpr>

Performs the + operation. Read more
Source§

impl<F: Clone + Field, E: Clone + ExpressionType<F>> Clone for Expression<F, E>
where E::MleVec: Clone,

Source§

fn clone(&self) -> Expression<F, E>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F: Debug + Field> Debug for Expression<F, ExprDescription>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F: Debug + Field> Debug for Expression<F, ProverExpr>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F: Debug + Field> Debug for Expression<F, VerifierExpr>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<F: Hash + Field, E: Hash + ExpressionType<F>> Hash for Expression<F, E>
where E::MleVec: Hash,

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<F: Field> Mul<F> for Expression<F, ExprDescription>

Source§

type Output = Expression<F, ExprDescription>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: F) -> Self::Output

Performs the * operation. Read more
Source§

impl<F: Field> Mul<F> for Expression<F, ProverExpr>

Source§

type Output = Expression<F, ProverExpr>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: F) -> Self::Output

Performs the * operation. Read more
Source§

impl<F: Field> Neg for Expression<F, ExprDescription>

Source§

type Output = Expression<F, ExprDescription>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<F: Field> Neg for Expression<F, ProverExpr>

Source§

type Output = Expression<F, ProverExpr>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<F, E: ExpressionType<F>> Serialize for Expression<F, E>
where F: Field,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<F: Field> Sub for Expression<F, ExprDescription>

Source§

type Output = Expression<F, ExprDescription>

The resulting type after applying the - operator.
Source§

fn sub( self, rhs: Expression<F, ExprDescription>, ) -> Expression<F, ExprDescription>

Performs the - operation. Read more
Source§

impl<F: Field> Sub for Expression<F, ProverExpr>

Source§

type Output = Expression<F, ProverExpr>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Expression<F, ProverExpr>) -> Expression<F, ProverExpr>

Performs the - operation. Read more

Auto 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>

§

impl<F, E> Send for Expression<F, E>
where <E as ExpressionType<F>>::MleVec: Send, <E as ExpressionType<F>>::MLENodeRepr: Send,

§

impl<F, E> Sync for Expression<F, E>
where <E as ExpressionType<F>>::MleVec: Sync, <E as ExpressionType<F>>::MLENodeRepr: Sync,

§

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>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DynClone for T
where T: Clone,

§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows 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) -> R
where R: 'a,

Mutably borrows 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
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> SyncDeps for T