Enum mz_sql::plan::expr::HirRelationExpr
source · pub enum HirRelationExpr {
Show 15 variants
Constant {
rows: Vec<Row>,
typ: RelationType,
},
Get {
id: Id,
typ: RelationType,
},
LetRec {
limit: Option<LetRecLimit>,
bindings: Vec<(String, LocalId, HirRelationExpr, RelationType)>,
body: Box<HirRelationExpr>,
},
Let {
name: String,
id: LocalId,
value: Box<HirRelationExpr>,
body: Box<HirRelationExpr>,
},
Project {
input: Box<HirRelationExpr>,
outputs: Vec<usize>,
},
Map {
input: Box<HirRelationExpr>,
scalars: Vec<HirScalarExpr>,
},
CallTable {
func: TableFunc,
exprs: Vec<HirScalarExpr>,
},
Filter {
input: Box<HirRelationExpr>,
predicates: Vec<HirScalarExpr>,
},
Join {
left: Box<HirRelationExpr>,
right: Box<HirRelationExpr>,
on: HirScalarExpr,
kind: JoinKind,
},
Reduce {
input: Box<HirRelationExpr>,
group_key: Vec<usize>,
aggregates: Vec<AggregateExpr>,
expected_group_size: Option<u64>,
},
Distinct {
input: Box<HirRelationExpr>,
},
TopK {
input: Box<HirRelationExpr>,
group_key: Vec<usize>,
order_key: Vec<ColumnOrder>,
limit: Option<HirScalarExpr>,
offset: usize,
expected_group_size: Option<u64>,
},
Negate {
input: Box<HirRelationExpr>,
},
Threshold {
input: Box<HirRelationExpr>,
},
Union {
base: Box<HirRelationExpr>,
inputs: Vec<HirRelationExpr>,
},
}
Expand description
Just like mz_expr::MirRelationExpr
, except where otherwise noted below.
Variants§
Constant
Get
LetRec
Mutually recursive CTE
Fields
limit: Option<LetRecLimit>
Maximum number of iterations to evaluate. If None, then there is no limit.
bindings: Vec<(String, LocalId, HirRelationExpr, RelationType)>
List of bindings all of which are in scope of each other.
body: Box<HirRelationExpr>
Result of the AST node.
Let
CTE
Fields
value: Box<HirRelationExpr>
The collection to be bound to name
.
body: Box<HirRelationExpr>
The result of the Let
, evaluated with name
bound to value
.
Project
Map
CallTable
Filter
Join
Unlike MirRelationExpr, we haven’t yet compiled LeftOuter/RightOuter/FullOuter joins away into more primitive exprs
Reduce
Unlike MirRelationExpr, when key
is empty AND input
is empty this returns
a single row with the aggregates evaluated over empty groups, rather than returning zero
rows
Distinct
Fields
input: Box<HirRelationExpr>
TopK
Groups and orders within each group, limiting output.
Fields
input: Box<HirRelationExpr>
The source collection.
order_key: Vec<ColumnOrder>
Column indices used to order rows within groups.
limit: Option<HirScalarExpr>
Number of records to retain
Negate
Fields
input: Box<HirRelationExpr>
Threshold
Keep rows from a dataflow where the row counts are positive.
Fields
input: Box<HirRelationExpr>
Union
Implementations§
source§impl HirRelationExpr
impl HirRelationExpr
fn fmt_virtual_syntax( &self, f: &mut Formatter<'_>, ctx: &mut PlanRenderingContext<'_, HirRelationExpr>, ) -> Result
fn fmt_raw_syntax( &self, f: &mut Formatter<'_>, ctx: &mut PlanRenderingContext<'_, HirRelationExpr>, ) -> Result
source§impl<'a> HirRelationExpr
impl<'a> HirRelationExpr
fn as_explain_single_plan( &'a mut self, context: &'a ExplainContext<'a>, ) -> Result<ExplainSinglePlan<'a, HirRelationExpr>, ExplainError>
source§impl HirRelationExpr
impl HirRelationExpr
pub fn typ( &self, outers: &[RelationType], params: &BTreeMap<usize, ScalarType>, ) -> RelationType
pub fn arity(&self) -> usize
sourcepub fn as_const(&self) -> Option<(&Vec<Row>, &RelationType)>
pub fn as_const(&self) -> Option<(&Vec<Row>, &RelationType)>
If self is a constant, return the value and the type, otherwise None
.
Reports whether this expression contains a column reference to its direct parent scope.
pub fn is_join_identity(&self) -> bool
pub fn project(self, outputs: Vec<usize>) -> Self
pub fn map(self, scalars: Vec<HirScalarExpr>) -> Self
pub fn filter(self, preds: Vec<HirScalarExpr>) -> Self
pub fn reduce( self, group_key: Vec<usize>, aggregates: Vec<AggregateExpr>, expected_group_size: Option<u64>, ) -> Self
pub fn top_k( self, group_key: Vec<usize>, order_key: Vec<ColumnOrder>, limit: Option<HirScalarExpr>, offset: usize, expected_group_size: Option<u64>, ) -> Self
pub fn negate(self) -> Self
pub fn distinct(self) -> Self
pub fn threshold(self) -> Self
pub fn union(self, other: Self) -> Self
pub fn exists(self) -> HirScalarExpr
pub fn select(self) -> HirScalarExpr
pub fn join( self, right: HirRelationExpr, on: HirScalarExpr, kind: JoinKind, ) -> HirRelationExpr
pub fn take(&mut self) -> HirRelationExpr
pub fn visit<'a, F>(&'a self, depth: usize, f: &mut F)
Visit::visit_post
.pub fn visit_fallible<'a, F, E>( &'a self, depth: usize, f: &mut F, ) -> Result<(), E>
Visit::try_visit_post
.pub fn visit1<'a, F, E>(&'a self, depth: usize, f: F) -> Result<(), E>
VisitChildren<HirRelationExpr>::try_visit_children
instead.pub fn visit_mut<F>(&mut self, depth: usize, f: &mut F)
Visit::visit_mut_post
instead.pub fn visit_mut_fallible<F, E>( &mut self, depth: usize, f: &mut F, ) -> Result<(), E>
Visit::try_visit_mut_post
instead.pub fn visit1_mut<'a, F, E>(&'a mut self, depth: usize, f: F) -> Result<(), E>
VisitChildren<HirRelationExpr>::try_visit_mut_children
instead.sourcepub fn visit_scalar_expressions<F, E>(
&self,
depth: usize,
f: &mut F,
) -> Result<(), E>
👎Deprecated: Use a combination of Visit
and VisitChildren
methods.
pub fn visit_scalar_expressions<F, E>( &self, depth: usize, f: &mut F, ) -> Result<(), E>
Visit
and VisitChildren
methods.Visits all scalar expressions within the sub-tree of the given relation.
The depth
argument should indicate the subquery nesting depth of the expression,
which will be incremented when entering the RHS of a join or a subquery and
presented to the supplied function f
.
sourcepub fn visit_scalar_expressions_mut<F, E>(
&mut self,
depth: usize,
f: &mut F,
) -> Result<(), E>
👎Deprecated: Use a combination of Visit
and VisitChildren
methods.
pub fn visit_scalar_expressions_mut<F, E>( &mut self, depth: usize, f: &mut F, ) -> Result<(), E>
Visit
and VisitChildren
methods.Like visit_scalar_expressions
, but permits mutating the expressions.
sourcepub fn visit_columns<F>(&self, depth: usize, f: &mut F)
👎Deprecated: Redefine this based on the Visit
and VisitChildren
methods.
pub fn visit_columns<F>(&self, depth: usize, f: &mut F)
Visit
and VisitChildren
methods.Visits the column references in this relation expression.
The depth
argument should indicate the subquery nesting depth of the expression,
which will be incremented when entering the RHS of a join or a subquery and
presented to the supplied function f
.
sourcepub fn visit_columns_mut<F>(&mut self, depth: usize, f: &mut F)
👎Deprecated: Redefine this based on the Visit
and VisitChildren
methods.
pub fn visit_columns_mut<F>(&mut self, depth: usize, f: &mut F)
Visit
and VisitChildren
methods.Like visit_columns
, but permits mutating the column references.
sourcepub fn bind_parameters(&mut self, params: &Params) -> Result<(), PlanError>
pub fn bind_parameters(&mut self, params: &Params) -> Result<(), PlanError>
Replaces any parameter references in the expression with the
corresponding datum from params
.
sourcepub fn splice_parameters(&mut self, params: &[HirScalarExpr], depth: usize)
pub fn splice_parameters(&mut self, params: &[HirScalarExpr], depth: usize)
See the documentation for HirScalarExpr::splice_parameters
.
sourcepub fn constant(rows: Vec<Vec<Datum<'_>>>, typ: RelationType) -> Self
pub fn constant(rows: Vec<Vec<Datum<'_>>>, typ: RelationType) -> Self
Constructs a constant collection from specific rows and schema.
sourcepub fn finish_maintained(
&mut self,
finishing: &mut RowSetFinishing<HirScalarExpr>,
group_size_hints: GroupSizeHints,
)
pub fn finish_maintained( &mut self, finishing: &mut RowSetFinishing<HirScalarExpr>, group_size_hints: GroupSizeHints, )
A RowSetFinishing
can only be directly applied to the result of a one-shot select.
This function is concerned with maintained queries, e.g., an index or materialized view.
Instead of directly applying the given RowSetFinishing
, it converts the RowSetFinishing
to a TopK
, which it then places at the top of self
. Additionally, it turns the given
finishing into a trivial finishing.
sourcepub fn could_run_expensive_function(&self) -> bool
pub fn could_run_expensive_function(&self) -> bool
The HirRelationExpr is considered potentially expensive if and only if at least one of the following conditions is true:
- It contains at least one CallTable or a Reduce operator.
- It contains at least one HirScalarExpr with a function call.
!!!WARNING!!!: this method has an MirRelationExpr counterpart. The two should be kept in sync w.r.t. HIR ⇒ MIR lowering!
sourcepub fn contains_temporal(&self) -> Result<bool, RecursionLimitError>
pub fn contains_temporal(&self) -> Result<bool, RecursionLimitError>
Whether the expression contains an UnmaterializableFunc::MzNow
call.
source§impl HirRelationExpr
impl HirRelationExpr
sourcepub fn lower<C: Into<Config>>(
self,
config: C,
metrics: Option<&OptimizerMetrics>,
) -> Result<MirRelationExpr, PlanError>
pub fn lower<C: Into<Config>>( self, config: C, metrics: Option<&OptimizerMetrics>, ) -> Result<MirRelationExpr, PlanError>
Rewrite self
into a MirRelationExpr
.
This requires rewriting all correlated subqueries (nested HirRelationExpr
s) into flat queries
sourcefn applied_to(
self,
id_gen: &mut IdGen,
get_outer: MirRelationExpr,
col_map: &ColumnMap,
cte_map: &mut BTreeMap<LocalId, CteDesc>,
context: &Context<'_>,
) -> Result<MirRelationExpr, PlanError>
fn applied_to( self, id_gen: &mut IdGen, get_outer: MirRelationExpr, col_map: &ColumnMap, cte_map: &mut BTreeMap<LocalId, CteDesc>, context: &Context<'_>, ) -> Result<MirRelationExpr, PlanError>
Return a MirRelationExpr
which evaluates self
once for each row of get_outer
.
For uncorrelated self
, this should be the cross-product between get_outer
and self
.
When self
references columns of get_outer
, much more work needs to occur.
The col_map
argument contains mappings to some of the columns of get_outer
, though
perhaps not all of them. It should be used as the basis of resolving column references,
but care must be taken when adding new columns that get_outer.arity()
is where they
will start, rather than any function of col_map
.
The get_outer
expression should be a Get
with no duplicate rows, describing the distinct
assignment of values to outer rows.
Trait Implementations§
source§impl Clone for HirRelationExpr
impl Clone for HirRelationExpr
source§fn clone(&self) -> HirRelationExpr
fn clone(&self) -> HirRelationExpr
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl CollectionPlan for HirRelationExpr
impl CollectionPlan for HirRelationExpr
source§impl Debug for HirRelationExpr
impl Debug for HirRelationExpr
source§impl<'de> Deserialize<'de> for HirRelationExpr
impl<'de> Deserialize<'de> for HirRelationExpr
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 DisplayText<PlanRenderingContext<'_, HirRelationExpr>> for HirRelationExpr
impl DisplayText<PlanRenderingContext<'_, HirRelationExpr>> for HirRelationExpr
fn fmt_text( &self, f: &mut Formatter<'_>, ctx: &mut PlanRenderingContext<'_, HirRelationExpr>, ) -> Result
source§impl<'a> Explain<'a> for HirRelationExpr
impl<'a> Explain<'a> for HirRelationExpr
§type Context = ExplainContext<'a>
type Context = ExplainContext<'a>
§type Text = ExplainSinglePlan<'a, HirRelationExpr>
type Text = ExplainSinglePlan<'a, HirRelationExpr>
Explain::explain_text
call.§type Json = ExplainSinglePlan<'a, HirRelationExpr>
type Json = ExplainSinglePlan<'a, HirRelationExpr>
Explain::explain_json
call.§type Dot = UnsupportedFormat
type Dot = UnsupportedFormat
Explain::explain_json
call.source§fn explain_text(
&'a mut self,
context: &'a Self::Context,
) -> Result<Self::Text, ExplainError>
fn explain_text( &'a mut self, context: &'a Self::Context, ) -> Result<Self::Text, ExplainError>
source§fn explain_json(
&'a mut self,
context: &'a Self::Context,
) -> Result<Self::Json, ExplainError>
fn explain_json( &'a mut self, context: &'a Self::Context, ) -> Result<Self::Json, ExplainError>
source§fn explain(
&'a mut self,
format: &'a ExplainFormat,
context: &'a Self::Context,
) -> Result<String, ExplainError>
fn explain( &'a mut self, format: &'a ExplainFormat, context: &'a Self::Context, ) -> Result<String, ExplainError>
source§fn explain_dot(
&'a mut self,
context: &'a Self::Context,
) -> Result<Self::Dot, ExplainError>
fn explain_dot( &'a mut self, context: &'a Self::Context, ) -> Result<Self::Dot, ExplainError>
source§impl Hash for HirRelationExpr
impl Hash for HirRelationExpr
source§impl Ord for HirRelationExpr
impl Ord for HirRelationExpr
source§fn cmp(&self, other: &HirRelationExpr) -> Ordering
fn cmp(&self, other: &HirRelationExpr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for HirRelationExpr
impl PartialEq for HirRelationExpr
source§impl PartialOrd for HirRelationExpr
impl PartialOrd for HirRelationExpr
source§impl Serialize for HirRelationExpr
impl Serialize for HirRelationExpr
source§impl VisitChildren<HirRelationExpr> for HirRelationExpr
impl VisitChildren<HirRelationExpr> for HirRelationExpr
source§fn visit_children<F>(&self, f: F)where
F: FnMut(&Self),
fn visit_children<F>(&self, f: F)where
F: FnMut(&Self),
f
to each direct child.source§fn visit_mut_children<F>(&mut self, f: F)where
F: FnMut(&mut Self),
fn visit_mut_children<F>(&mut self, f: F)where
F: FnMut(&mut Self),
f
to each direct child.source§impl VisitChildren<HirScalarExpr> for HirRelationExpr
impl VisitChildren<HirScalarExpr> for HirRelationExpr
source§fn visit_children<F>(&self, f: F)where
F: FnMut(&HirScalarExpr),
fn visit_children<F>(&self, f: F)where
F: FnMut(&HirScalarExpr),
f
to each direct child.source§fn visit_mut_children<F>(&mut self, f: F)where
F: FnMut(&mut HirScalarExpr),
fn visit_mut_children<F>(&mut self, f: F)where
F: FnMut(&mut HirScalarExpr),
f
to each direct child.source§fn try_visit_children<F, E>(&self, f: F) -> Result<(), E>
fn try_visit_children<F, E>(&self, f: F) -> Result<(), E>
f
to each direct child. Read moreimpl Eq for HirRelationExpr
impl StructuralPartialEq for HirRelationExpr
Auto Trait Implementations§
impl Freeze for HirRelationExpr
impl RefUnwindSafe for HirRelationExpr
impl Send for HirRelationExpr
impl Sync for HirRelationExpr
impl Unpin for HirRelationExpr
impl UnwindSafe for HirRelationExpr
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§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.source§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.source§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.source§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.source§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.source§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.source§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.source§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.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
impl<T, U> OverrideFrom<Option<&T>> for Uwhere
U: OverrideFrom<T>,
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§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 moresource§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 moresource§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
source§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
source§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.source§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.source§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.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> PreferredContainer for T
impl<T> PreferredContainer for T
source§impl<T> ProgressEventTimestamp for T
impl<T> ProgressEventTimestamp for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.source§impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
impl<'a, S, T> Semigroup<&'a S> for Twhere
T: Semigroup<S>,
source§fn plus_equals(&mut self, rhs: &&'a S)
fn plus_equals(&mut self, rhs: &&'a S)
std::ops::AddAssign
, for types that do not implement AddAssign
.source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> Tap for T
impl<T> Tap for T
source§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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 moresource§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.source§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.source§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.source§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.source§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.source§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.source§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.source§impl<T> Visit for Twhere
T: VisitChildren<T>,
impl<T> Visit for Twhere
T: VisitChildren<T>,
source§fn visit_post<F>(&self, f: &mut F) -> Result<(), RecursionLimitError>
fn visit_post<F>(&self, f: &mut F) -> Result<(), RecursionLimitError>
self
.source§fn visit_post_nolimit<F>(&self, f: &mut F)
fn visit_post_nolimit<F>(&self, f: &mut F)
visit_post
instead.self
.
Does not enforce a recursion limit.source§fn visit_mut_post<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError>
fn visit_mut_post<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError>
self
.source§fn visit_mut_post_nolimit<F>(&mut self, f: &mut F)
fn visit_mut_post_nolimit<F>(&mut self, f: &mut F)
visit_mut_post
instead.self
.
Does not enforce a recursion limit.source§fn try_visit_post<F, E>(&self, f: &mut F) -> Result<(), E>
fn try_visit_post<F, E>(&self, f: &mut F) -> Result<(), E>
self
.source§fn try_visit_mut_post<F, E>(&mut self, f: &mut F) -> Result<(), E>
fn try_visit_mut_post<F, E>(&mut self, f: &mut F) -> Result<(), E>
self
.source§fn visit_pre<F>(&self, f: &mut F) -> Result<(), RecursionLimitError>
fn visit_pre<F>(&self, f: &mut F) -> Result<(), RecursionLimitError>
self
.source§fn visit_pre_with_context<Context, AccFun, Visitor>(
&self,
init: Context,
acc_fun: &mut AccFun,
visitor: &mut Visitor,
) -> Result<(), RecursionLimitError>
fn visit_pre_with_context<Context, AccFun, Visitor>( &self, init: Context, acc_fun: &mut AccFun, visitor: &mut Visitor, ) -> Result<(), RecursionLimitError>
self
, which also accumulates context
information along the path from the root to the current node’s parent.
acc_fun
is a similar closure as in fold
. The accumulated context is passed to the
visitor, along with the current node. Read moresource§fn visit_pre_nolimit<F>(&self, f: &mut F)
fn visit_pre_nolimit<F>(&self, f: &mut F)
visit_pre
instead.self
.
Does not enforce a recursion limit.source§fn visit_mut_pre<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError>
fn visit_mut_pre<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError>
self
.source§fn visit_mut_pre_nolimit<F>(&mut self, f: &mut F)
fn visit_mut_pre_nolimit<F>(&mut self, f: &mut F)
visit_mut_pre
instead.self
.
Does not enforce a recursion limit.source§fn try_visit_pre<F, E>(&self, f: &mut F) -> Result<(), E>
fn try_visit_pre<F, E>(&self, f: &mut F) -> Result<(), E>
self
.source§fn try_visit_mut_pre<F, E>(&mut self, f: &mut F) -> Result<(), E>
fn try_visit_mut_pre<F, E>(&mut self, f: &mut F) -> Result<(), E>
self
.source§fn visit_pre_post<F1, F2>(
&self,
pre: &mut F1,
post: &mut F2,
) -> Result<(), RecursionLimitError>
fn visit_pre_post<F1, F2>( &self, pre: &mut F1, post: &mut F2, ) -> Result<(), RecursionLimitError>
source§fn visit_pre_post_nolimit<F1, F2>(&self, pre: &mut F1, post: &mut F2)
fn visit_pre_post_nolimit<F1, F2>(&self, pre: &mut F1, post: &mut F2)
visit
instead.Visit::visit_pre
and Visit::visit_post
.
Does not enforce a recursion limit. Read moresource§fn visit_mut_pre_post<F1, F2>(
&mut self,
pre: &mut F1,
post: &mut F2,
) -> Result<(), RecursionLimitError>
fn visit_mut_pre_post<F1, F2>( &mut self, pre: &mut F1, post: &mut F2, ) -> Result<(), RecursionLimitError>
visit_mut
instead.source§fn visit_mut_pre_post_nolimit<F1, F2>(&mut self, pre: &mut F1, post: &mut F2)
fn visit_mut_pre_post_nolimit<F1, F2>(&mut self, pre: &mut F1, post: &mut F2)
visit_mut_pre_post
instead.Visit::visit_mut_pre
and Visit::visit_mut_post
.
Does not enforce a recursion limit. Read more