Enum mz_expr::relation::MirRelationExpr
source · [−]pub enum MirRelationExpr {
Show 14 variants
Constant {
rows: Result<Vec<(Row, Diff)>, EvalError>,
typ: RelationType,
},
Get {
id: Id,
typ: RelationType,
},
Let {
id: LocalId,
value: Box<MirRelationExpr>,
body: Box<MirRelationExpr>,
},
Project {
input: Box<MirRelationExpr>,
outputs: Vec<usize>,
},
Map {
input: Box<MirRelationExpr>,
scalars: Vec<MirScalarExpr>,
},
FlatMap {
input: Box<MirRelationExpr>,
func: TableFunc,
exprs: Vec<MirScalarExpr>,
},
Filter {
input: Box<MirRelationExpr>,
predicates: Vec<MirScalarExpr>,
},
Join {
inputs: Vec<MirRelationExpr>,
equivalences: Vec<Vec<MirScalarExpr>>,
implementation: JoinImplementation,
},
Reduce {
input: Box<MirRelationExpr>,
group_key: Vec<MirScalarExpr>,
aggregates: Vec<AggregateExpr>,
monotonic: bool,
expected_group_size: Option<usize>,
},
TopK {
input: Box<MirRelationExpr>,
group_key: Vec<usize>,
order_key: Vec<ColumnOrder>,
limit: Option<usize>,
offset: usize,
monotonic: bool,
},
Negate {
input: Box<MirRelationExpr>,
},
Threshold {
input: Box<MirRelationExpr>,
},
Union {
base: Box<MirRelationExpr>,
inputs: Vec<MirRelationExpr>,
},
ArrangeBy {
input: Box<MirRelationExpr>,
keys: Vec<Vec<MirScalarExpr>>,
},
}
Expand description
An abstract syntax tree which defines a collection.
The AST is meant to reflect the capabilities of the differential_dataflow::Collection
type,
written generically enough to avoid run-time compilation work.
Variants
Constant
Fields
typ: RelationType
Schema of the collection.
A constant relation containing specified rows.
The runtime memory footprint of this operator is zero.
Get
Get an existing dataflow.
The runtime memory footprint of this operator is zero.
Let
Fields
id: LocalId
The identifier to be used in Get
variants to retrieve value
.
value: Box<MirRelationExpr>
The collection to be bound to id
.
body: Box<MirRelationExpr>
The result of the Let
, evaluated with id
bound to value
.
Introduce a temporary dataflow.
The runtime memory footprint of this operator is zero.
Project
Fields
input: Box<MirRelationExpr>
The source collection.
Project out some columns from a dataflow
The runtime memory footprint of this operator is zero.
Map
Fields
input: Box<MirRelationExpr>
The source collection.
scalars: Vec<MirScalarExpr>
Expressions which determine values to append to each row.
An expression may refer to columns in input
or
expressions defined earlier in the vector
Append new columns to a dataflow
The runtime memory footprint of this operator is zero.
FlatMap
Fields
input: Box<MirRelationExpr>
The source collection
func: TableFunc
The table func to apply
exprs: Vec<MirScalarExpr>
The argument to the table func
Like Map, but yields zero-or-more output rows per input row
The runtime memory footprint of this operator is zero.
Filter
Fields
input: Box<MirRelationExpr>
The source collection.
predicates: Vec<MirScalarExpr>
Predicates, each of which must be true.
Keep rows from a dataflow where all the predicates are true
The runtime memory footprint of this operator is zero.
Join
Fields
inputs: Vec<MirRelationExpr>
A sequence of input relations.
equivalences: Vec<Vec<MirScalarExpr>>
A sequence of equivalence classes of expressions on the cross product of inputs.
Each equivalence class is a list of scalar expressions, where for each class the intended interpretation is that all evaluated expressions should be equal.
Each scalar expression is to be evaluated over the cross-product of all records from all inputs. In many cases this may just be column selection from specific inputs, but more general cases exist (e.g. complex functions of multiple columns from multiple inputs, or just constant literals).
implementation: JoinImplementation
Join implementation information.
Join several collections, where some columns must be equal.
For further details consult the documentation for MirRelationExpr::join
.
The runtime memory footprint of this operator can be proportional to the sizes of all inputs and the size of all joins of prefixes. This may be reduced due to arrangements available at rendering time.
Reduce
Fields
input: Box<MirRelationExpr>
The source collection.
group_key: Vec<MirScalarExpr>
Column indices used to form groups.
aggregates: Vec<AggregateExpr>
Expressions which determine values to append to each row, after the group keys.
monotonic: bool
True iff the input is known to monotonically increase (only addition of records).
Group a dataflow by some columns and aggregate over each group
The runtime memory footprint of this operator is at most proportional to the number of distinct records in the input and output. The actual requirements can be less: the number of distinct inputs to each aggregate, summed across each aggregate, plus the output size. For more details consult the code that builds the associated dataflow.
TopK
Fields
input: Box<MirRelationExpr>
The source collection.
order_key: Vec<ColumnOrder>
Column indices used to order rows within groups.
offset: usize
Number of records to skip
monotonic: bool
True iff the input is known to monotonically increase (only addition of records).
Groups and orders within each group, limiting output.
The runtime memory footprint of this operator is proportional to its input and output.
Negate
Fields
input: Box<MirRelationExpr>
The source collection.
Return a dataflow where the row counts are negated
The runtime memory footprint of this operator is zero.
Threshold
Fields
input: Box<MirRelationExpr>
The source collection.
Keep rows from a dataflow where the row counts are positive
The runtime memory footprint of this operator is proportional to its input and output.
Union
Fields
base: Box<MirRelationExpr>
A source collection.
inputs: Vec<MirRelationExpr>
Source collections to union.
Adds the frequencies of elements in contained sets.
The runtime memory footprint of this operator is zero.
ArrangeBy
Fields
input: Box<MirRelationExpr>
The source collection
keys: Vec<Vec<MirScalarExpr>>
Columns to arrange input
by, in order of decreasing primacy
Technically a no-op. Used to render an index. Will be used to optimize queries on finer grain
The runtime memory footprint of this operator is proportional to its input.
Implementations
sourceimpl MirRelationExpr
impl MirRelationExpr
sourcepub fn typ(&self) -> RelationType
pub fn typ(&self) -> RelationType
Reports the schema of the relation.
This method determines the type through recursive traversal of the relation expression, drawing from the types of base collections. As such, this is not an especially cheap method, and should be used judiciously.
The relation type is computed incrementally with a recursive post-order
traversal, that accumulates the input types for the relations yet to be
visited in type_stack
.
sourcepub fn typ_with_input_types(&self, input_types: &[RelationType]) -> RelationType
pub fn typ_with_input_types(&self, input_types: &[RelationType]) -> RelationType
Reports the schema of the relation given the schema of the input relations.
input_types
is required to contain the schemas for the input relations of
the current relation in the same order as they are visited by try_visit1
method, even though not all may be used for computing the schema of the
current relation. For example, Let
expects two input types, one for the
value relation and one for the body, in that order, but only the one for the
body is used to determine the type of the Let
relation.
It is meant to be used during post-order traversals to compute relation schemas incrementally.
sourcepub fn arity(&self) -> usize
pub fn arity(&self) -> usize
The number of columns in the relation.
This number is determined from the type, which is determined recursively at non-trivial cost.
sourcepub fn num_inputs(&self) -> usize
pub fn num_inputs(&self) -> usize
The number of child relations this relation has.
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, where each row will have a multiplicity of one.
sourcepub fn constant_diff(
rows: Vec<(Vec<Datum<'_>>, Diff)>,
typ: RelationType
) -> Self
pub fn constant_diff(
rows: Vec<(Vec<Datum<'_>>, Diff)>,
typ: RelationType
) -> Self
Constructs a constant collection from specific rows and schema, where each row can have an arbitrary multiplicity.
sourcepub fn global_get(id: GlobalId, typ: RelationType) -> Self
pub fn global_get(id: GlobalId, typ: RelationType) -> Self
Constructs the expression for getting a global collection
sourcepub fn project(self, outputs: Vec<usize>) -> Self
pub fn project(self, outputs: Vec<usize>) -> Self
Retains only the columns specified by output
.
sourcepub fn map(self, scalars: Vec<MirScalarExpr>) -> Self
pub fn map(self, scalars: Vec<MirScalarExpr>) -> Self
Append to each row the results of applying elements of scalar
.
sourcepub fn map_one(self, scalar: MirScalarExpr) -> Self
pub fn map_one(self, scalar: MirScalarExpr) -> Self
Append to each row a single scalar
.
sourcepub fn flat_map(self, func: TableFunc, exprs: Vec<MirScalarExpr>) -> Self
pub fn flat_map(self, func: TableFunc, exprs: Vec<MirScalarExpr>) -> Self
Like map
, but yields zero-or-more output rows per input row
sourcepub fn filter<I>(self, predicates: I) -> Self where
I: IntoIterator<Item = MirScalarExpr>,
pub fn filter<I>(self, predicates: I) -> Self where
I: IntoIterator<Item = MirScalarExpr>,
Retain only the rows satisfying each of several predicates.
sourcepub fn product(self, right: Self) -> Self
pub fn product(self, right: Self) -> Self
Form the Cartesian outer-product of rows in both inputs.
sourcepub fn join(
inputs: Vec<MirRelationExpr>,
variables: Vec<Vec<(usize, usize)>>
) -> Self
pub fn join(
inputs: Vec<MirRelationExpr>,
variables: Vec<Vec<(usize, usize)>>
) -> Self
Performs a relational equijoin among the input collections.
The sequence inputs
each describe different input collections, and the sequence variables
describes
equality constraints that some of their columns must satisfy. Each element in variable
describes a set
of pairs (input_index, column_index)
where every value described by that set must be equal.
For example, the pair (input, column)
indexes into inputs[input][column]
, extracting the input
th
input collection and for each row examining its column
th column.
Example
use mz_repr::{Datum, ColumnType, RelationType, ScalarType};
use mz_expr::MirRelationExpr;
// A common schema for each input.
let schema = RelationType::new(vec![
ScalarType::Int32.nullable(false),
ScalarType::Int32.nullable(false),
]);
// the specific data are not important here.
let data = vec![Datum::Int32(0), Datum::Int32(1)];
// Three collections that could have been different.
let input0 = MirRelationExpr::constant(vec![data.clone()], schema.clone());
let input1 = MirRelationExpr::constant(vec![data.clone()], schema.clone());
let input2 = MirRelationExpr::constant(vec![data.clone()], schema.clone());
// Join the three relations looking for triangles, like so.
//
// Output(A,B,C) := Input0(A,B), Input1(B,C), Input2(A,C)
let joined = MirRelationExpr::join(
vec![input0, input1, input2],
vec![
vec![(0,0), (2,0)], // fields A of inputs 0 and 2.
vec![(0,1), (1,0)], // fields B of inputs 0 and 1.
vec![(1,1), (2,1)], // fields C of inputs 1 and 2.
],
);
// Technically the above produces `Output(A,B,B,C,A,C)` because the columns are concatenated.
// A projection resolves this and produces the correct output.
let result = joined.project(vec![0, 1, 3]);
sourcepub fn join_scalars(
inputs: Vec<MirRelationExpr>,
equivalences: Vec<Vec<MirScalarExpr>>
) -> Self
pub fn join_scalars(
inputs: Vec<MirRelationExpr>,
equivalences: Vec<Vec<MirScalarExpr>>
) -> Self
Constructs a join operator from inputs and required-equal scalar expressions.
sourcepub fn reduce(
self,
group_key: Vec<usize>,
aggregates: Vec<AggregateExpr>,
expected_group_size: Option<usize>
) -> Self
pub fn reduce(
self,
group_key: Vec<usize>,
aggregates: Vec<AggregateExpr>,
expected_group_size: Option<usize>
) -> Self
Perform a key-wise reduction / aggregation.
The group_key
argument indicates columns in the input collection that should
be grouped, and aggregates
lists aggregation functions each of which produces
one output column in addition to the keys.
sourcepub fn top_k(
self,
group_key: Vec<usize>,
order_key: Vec<ColumnOrder>,
limit: Option<usize>,
offset: usize
) -> Self
pub fn top_k(
self,
group_key: Vec<usize>,
order_key: Vec<ColumnOrder>,
limit: Option<usize>,
offset: usize
) -> Self
Perform a key-wise reduction order by and limit.
The group_key
argument indicates columns in the input collection that should
be grouped, the order_key
argument indicates columns that should be further
used to order records within groups, and the limit
argument constrains the
total number of records that should be produced in each group.
sourcepub fn distinct_by(self, group_key: Vec<usize>) -> Self
pub fn distinct_by(self, group_key: Vec<usize>) -> Self
Removes all but the first occurrence of each key. Columns not included
in the group_key
are discarded.
sourcepub fn union_many(inputs: Vec<Self>, typ: RelationType) -> Self
pub fn union_many(inputs: Vec<Self>, typ: RelationType) -> Self
Unions together any number inputs.
If inputs
is empty, then an empty relation of type typ
is
constructed.
sourcepub fn union(self, other: Self) -> Self
pub fn union(self, other: Self) -> Self
Produces one collection where each row is present with the sum of its frequencies in each input.
sourcepub fn arrange_by(self, keys: &[Vec<MirScalarExpr>]) -> Self
pub fn arrange_by(self, keys: &[Vec<MirScalarExpr>]) -> Self
Arranges the collection by the specified columns
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Indicates if this is a constant empty collection.
A false value does not mean the collection is known to be non-empty, only that we cannot currently determine that it is statically empty.
sourcepub fn pretty_humanized(&self, id_humanizer: &impl ExprHumanizer) -> String
pub fn pretty_humanized(&self, id_humanizer: &impl ExprHumanizer) -> String
Pretty-print this MirRelationExpr to a string.
This method allows an additional ExprHumanizer
which can annotate
identifiers with human-meaningful names for the identifiers.
sourcepub fn pretty_typed(&self) -> String
pub fn pretty_typed(&self) -> String
Pretty-print this MirRelationExpr to a string with type information.
sourcepub fn take_safely(&mut self) -> MirRelationExpr
pub fn take_safely(&mut self) -> MirRelationExpr
Take ownership of self
, leaving an empty MirRelationExpr::Constant
with the correct type.
sourcepub fn take_dangerous(&mut self) -> MirRelationExpr
pub fn take_dangerous(&mut self) -> MirRelationExpr
Take ownership of self
, leaving an empty MirRelationExpr::Constant
with an incorrect type.
This should only be used if self
is about to be dropped or otherwise overwritten.
sourcepub fn replace_using<F>(&mut self, logic: F) where
F: FnOnce(MirRelationExpr) -> MirRelationExpr,
pub fn replace_using<F>(&mut self, logic: F) where
F: FnOnce(MirRelationExpr) -> MirRelationExpr,
Replaces self
with some logic applied to self
.
sourcepub fn let_in<Body>(self, id_gen: &mut IdGen, body: Body) -> MirRelationExpr where
Body: FnOnce(&mut IdGen, MirRelationExpr) -> MirRelationExpr,
pub fn let_in<Body>(self, id_gen: &mut IdGen, body: Body) -> MirRelationExpr where
Body: FnOnce(&mut IdGen, MirRelationExpr) -> MirRelationExpr,
Store self
in a Let
and pass the corresponding Get
to body
sourcepub fn anti_lookup(
self,
id_gen: &mut IdGen,
keys_and_values: MirRelationExpr,
default: Vec<(Datum<'_>, ScalarType)>
) -> MirRelationExpr
pub fn anti_lookup(
self,
id_gen: &mut IdGen,
keys_and_values: MirRelationExpr,
default: Vec<(Datum<'_>, ScalarType)>
) -> MirRelationExpr
Return every row in self
that does not have a matching row in the first columns of keys_and_values
, using default
to fill in the remaining columns
(If default
is a row of nulls, this is the ‘outer’ part of LEFT OUTER JOIN)
sourcepub fn lookup(
self,
id_gen: &mut IdGen,
keys_and_values: MirRelationExpr,
default: Vec<(Datum<'static>, ScalarType)>
) -> MirRelationExpr
pub fn lookup(
self,
id_gen: &mut IdGen,
keys_and_values: MirRelationExpr,
default: Vec<(Datum<'static>, ScalarType)>
) -> MirRelationExpr
Return:
- every row in keys_and_values
- every row in
self
that does not have a matching row in the first columns ofkeys_and_values
, usingdefault
to fill in the remaining columns (This is LEFT OUTER JOIN if:
default
is a row of null- matching rows in
keys_and_values
andself
have the same multiplicity.)
sourcepub fn contains_temporal(&mut self) -> bool
pub fn contains_temporal(&mut self) -> bool
True iff the expression contains a NullaryFunc::MzLogicalTimestamp
.
sourcepub fn try_visit_scalars_mut1<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
pub fn try_visit_scalars_mut1<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
Fallible visitor for the MirScalarExpr
s directly owned by this relation expression.
The f
visitor should not recursively descend into owned MirRelationExpr
s.
sourcepub fn try_visit_scalars_mut<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
pub fn try_visit_scalars_mut<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut MirScalarExpr) -> Result<(), E>,
E: From<RecursionLimitError>,
Fallible mutable visitor for the MirScalarExpr
s in the MirRelationExpr
subtree rooted at self
.
Note that this does not recurse into MirRelationExpr
subtrees within MirScalarExpr
nodes.
sourcepub fn visit_scalars_mut<F>(&mut self, f: &mut F) where
F: FnMut(&mut MirScalarExpr),
pub fn visit_scalars_mut<F>(&mut self, f: &mut F) where
F: FnMut(&mut MirScalarExpr),
Infallible mutable visitor for the MirScalarExpr
s in the MirRelationExpr
subtree rooted at at self
.
Note that this does not recurse into MirRelationExpr
subtrees within MirScalarExpr
nodes.
Trait Implementations
sourceimpl Clone for MirRelationExpr
impl Clone for MirRelationExpr
sourcefn clone(&self) -> MirRelationExpr
fn clone(&self) -> MirRelationExpr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl CollectionPlan for MirRelationExpr
impl CollectionPlan for MirRelationExpr
sourcefn depends_on_into(&self, out: &mut BTreeSet<GlobalId>)
fn depends_on_into(&self, out: &mut BTreeSet<GlobalId>)
Appends global identifiers on which this plan depends to out
.
sourcefn depends_on(&self) -> BTreeSet<GlobalId>
fn depends_on(&self) -> BTreeSet<GlobalId>
Returns the global identifiers on which this plan depends. Read more
sourceimpl Debug for MirRelationExpr
impl Debug for MirRelationExpr
sourceimpl<'de> Deserialize<'de> for MirRelationExpr
impl<'de> Deserialize<'de> for MirRelationExpr
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for MirRelationExpr
impl Hash for MirRelationExpr
sourceimpl MzReflect for MirRelationExpr
impl MzReflect for MirRelationExpr
sourcefn add_to_reflected_type_info(rti: &mut ReflectedTypeInfo)
fn add_to_reflected_type_info(rti: &mut ReflectedTypeInfo)
Adds names and types of the fields of the struct or enum to rti
. Read more
sourceimpl PartialEq<MirRelationExpr> for MirRelationExpr
impl PartialEq<MirRelationExpr> for MirRelationExpr
sourcefn eq(&self, other: &MirRelationExpr) -> bool
fn eq(&self, other: &MirRelationExpr) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MirRelationExpr) -> bool
fn ne(&self, other: &MirRelationExpr) -> bool
This method tests for !=
.
sourceimpl Serialize for MirRelationExpr
impl Serialize for MirRelationExpr
sourceimpl VisitChildren for MirRelationExpr
impl VisitChildren for MirRelationExpr
sourcefn visit_children<'a, F>(&'a self, f: F) where
F: FnMut(&'a Self),
fn visit_children<'a, F>(&'a self, f: F) where
F: FnMut(&'a Self),
Apply an infallible immutable function f
to each direct child.
sourcefn visit_mut_children<'a, F>(&'a mut self, f: F) where
F: FnMut(&'a mut Self),
fn visit_mut_children<'a, F>(&'a mut self, f: F) where
F: FnMut(&'a mut Self),
Apply an infallible mutable function f
to each direct child.
impl Eq for MirRelationExpr
impl StructuralEq for MirRelationExpr
impl StructuralPartialEq for MirRelationExpr
Auto Trait Implementations
impl RefUnwindSafe for MirRelationExpr
impl Send for MirRelationExpr
impl Sync for MirRelationExpr
impl Unpin for MirRelationExpr
impl UnwindSafe for MirRelationExpr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
sourceimpl<T> ProgressEventTimestamp for T where
T: Data + Debug + Any,
impl<T> ProgressEventTimestamp for T where
T: Data + Debug + Any,
sourceimpl<P, R> ProtoType<R> for P where
R: RustType<P>,
impl<P, R> ProtoType<R> for P where
R: RustType<P>,
sourcefn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
See RustType::from_proto
.
sourcefn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
See RustType::into_proto
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> Visit for T where
T: VisitChildren,
impl<T> Visit for T where
T: VisitChildren,
sourcefn visit_post<F>(&self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&T),
fn visit_post<F>(&self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&T),
Post-order immutable infallible visitor for self
.
sourcefn visit_post_nolimit<F>(&self, f: &mut F) where
F: FnMut(&T),
fn visit_post_nolimit<F>(&self, f: &mut F) where
F: FnMut(&T),
Use visit_post
instead.
Post-order immutable infallible visitor for self
.
Does not enforce a recursion limit. Read more
sourcefn visit_mut_post<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&mut T),
fn visit_mut_post<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&mut T),
Post-order mutable infallible visitor for self
.
sourcefn visit_mut_post_nolimit<F>(&mut self, f: &mut F) where
F: FnMut(&mut T),
fn visit_mut_post_nolimit<F>(&mut self, f: &mut F) where
F: FnMut(&mut T),
Use visit_mut_post
instead.
Post-order mutable infallible visitor for self
.
Does not enforce a recursion limit. Read more
sourcefn try_visit_post<F, E>(&self, f: &mut F) -> Result<(), E> where
F: FnMut(&T) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_post<F, E>(&self, f: &mut F) -> Result<(), E> where
F: FnMut(&T) -> Result<(), E>,
E: From<RecursionLimitError>,
Post-order immutable fallible visitor for self
.
sourcefn try_visit_mut_post<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut T) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_mut_post<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut T) -> Result<(), E>,
E: From<RecursionLimitError>,
Post-order mutable fallible visitor for self
.
sourcefn visit_pre<F>(&self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&T),
fn visit_pre<F>(&self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&T),
Pre-order immutable infallible visitor for self
.
sourcefn visit_pre_nolimit<F>(&self, f: &mut F) where
F: FnMut(&T),
fn visit_pre_nolimit<F>(&self, f: &mut F) where
F: FnMut(&T),
Use visit_pre
instead.
Pre-order immutable infallible visitor for self
.
Does not enforce a recursion limit. Read more
sourcefn visit_mut_pre<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&mut T),
fn visit_mut_pre<F>(&mut self, f: &mut F) -> Result<(), RecursionLimitError> where
F: FnMut(&mut T),
Pre-order mutable infallible visitor for self
.
sourcefn visit_mut_pre_nolimit<F>(&mut self, f: &mut F) where
F: FnMut(&mut T),
fn visit_mut_pre_nolimit<F>(&mut self, f: &mut F) where
F: FnMut(&mut T),
Use visit_mut_pre
instead.
Pre-order mutable infallible visitor for self
.
Does not enforce a recursion limit. Read more
sourcefn try_visit_pre<F, E>(&self, f: &mut F) -> Result<(), E> where
F: FnMut(&T) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_pre<F, E>(&self, f: &mut F) -> Result<(), E> where
F: FnMut(&T) -> Result<(), E>,
E: From<RecursionLimitError>,
Pre-order immutable fallible visitor for self
.
sourcefn try_visit_mut_pre<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut T) -> Result<(), E>,
E: From<RecursionLimitError>,
fn try_visit_mut_pre<F, E>(&mut self, f: &mut F) -> Result<(), E> where
F: FnMut(&mut T) -> Result<(), E>,
E: From<RecursionLimitError>,
Pre-order mutable fallible visitor for self
.
sourcefn visit_pre_post<F1, F2>(
&self,
pre: &mut F1,
post: &mut F2
) -> Result<(), RecursionLimitError> where
F1: FnMut(&T) -> Option<Vec<&T, Global>>,
F2: FnMut(&T),
fn visit_pre_post<F1, F2>(
&self,
pre: &mut F1,
post: &mut F2
) -> Result<(), RecursionLimitError> where
F1: FnMut(&T) -> Option<Vec<&T, Global>>,
F2: FnMut(&T),
A generalization of Visit::visit_pre
and Visit::visit_post
. Read more
sourcefn visit_pre_post_nolimit<F1, F2>(&self, pre: &mut F1, post: &mut F2) where
F1: FnMut(&T) -> Option<Vec<&T, Global>>,
F2: FnMut(&T),
fn visit_pre_post_nolimit<F1, F2>(&self, pre: &mut F1, post: &mut F2) where
F1: FnMut(&T) -> Option<Vec<&T, Global>>,
F2: FnMut(&T),
Use visit_pre_post
instead.
A generalization of Visit::visit_pre
and Visit::visit_post
.
Does not enforce a recursion limit. Read more
sourcefn visit_mut_pre_post<F1, F2>(
&mut self,
pre: &mut F1,
post: &mut F2
) -> Result<(), RecursionLimitError> where
F1: FnMut(&mut T) -> Option<Vec<&mut T, Global>>,
F2: FnMut(&mut T),
fn visit_mut_pre_post<F1, F2>(
&mut self,
pre: &mut F1,
post: &mut F2
) -> Result<(), RecursionLimitError> where
F1: FnMut(&mut T) -> Option<Vec<&mut T, Global>>,
F2: FnMut(&mut T),
A generalization of Visit::visit_mut_pre
and Visit::visit_mut_post
. Read more
sourcefn visit_mut_pre_post_nolimit<F1, F2>(&mut self, pre: &mut F1, post: &mut F2) where
F1: FnMut(&mut T) -> Option<Vec<&mut T, Global>>,
F2: FnMut(&mut T),
fn visit_mut_pre_post_nolimit<F1, F2>(&mut self, pre: &mut F1, post: &mut F2) where
F1: FnMut(&mut T) -> Option<Vec<&mut T, Global>>,
F2: FnMut(&mut T),
Use visit_mut_pre_post
instead.
A generalization of Visit::visit_mut_pre
and Visit::visit_mut_post
.
Does not enforce a recursion limit. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more