pub enum HirScalarExpr {
Column(ColumnRef),
Parameter(usize),
Literal(Row, ColumnType),
CallUnmaterializable(UnmaterializableFunc),
CallUnary {
func: UnaryFunc,
expr: Box<HirScalarExpr>,
},
CallBinary {
func: BinaryFunc,
expr1: Box<HirScalarExpr>,
expr2: Box<HirScalarExpr>,
},
CallVariadic {
func: VariadicFunc,
exprs: Vec<HirScalarExpr>,
},
If {
cond: Box<HirScalarExpr>,
then: Box<HirScalarExpr>,
els: Box<HirScalarExpr>,
},
Exists(Box<HirRelationExpr>),
Select(Box<HirRelationExpr>),
Windowing(WindowExpr),
}Expand description
Just like mz_expr::MirScalarExpr, except where otherwise noted below.
Variants§
Column(ColumnRef)
Unlike mz_expr::MirScalarExpr, we can nest HirRelationExprs via eg Exists. This means that a variable could refer to a column of the current input, or to a column of an outer relation. We use ColumnRef to denote the difference.
Parameter(usize)
Literal(Row, ColumnType)
CallUnmaterializable(UnmaterializableFunc)
CallUnary
CallBinary
CallVariadic
If
Exists(Box<HirRelationExpr>)
Returns true if expr returns any rows
Select(Box<HirRelationExpr>)
Given expr with arity 1. If expr returns:
- 0 rows, return NULL
- 1 row, return the value of that row
-
1 rows, the sql spec says we should throw an error but we can’t (see https://github.com/MaterializeInc/database-issues/issues/154) so instead we return all the rows. If there are multiple
Selectexpressions in a single SQL query, the result is that we take the product of all of them. This is counter to the spec, but is consistent with eg postgres’ treatment of multiple set-returning-functions (see https://tapoueh.org/blog/2017/10/set-returning-functions-and-postgresql-10/).
Windowing(WindowExpr)
Implementations§
Source§impl HirScalarExpr
impl HirScalarExpr
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 in params.
Sourcepub fn splice_parameters(&mut self, params: &[HirScalarExpr], depth: usize)
pub fn splice_parameters(&mut self, params: &[HirScalarExpr], depth: usize)
Like HirScalarExpr::bind_parameters, except that parameters are
replaced with the corresponding expression fragment from params rather
than a datum.
Specifically, the parameter $1 will be replaced with params[0], the
parameter $2 will be replaced with params[1], and so on. Parameters
in self that refer to invalid indices of params will cause a panic.
Column references in parameters will be corrected to account for the depth at which they are spliced.
Sourcepub fn contains_temporal(&self) -> bool
pub fn contains_temporal(&self) -> bool
Whether the expression contains an UnmaterializableFunc::MzNow call.
Sourcepub fn column(index: usize) -> HirScalarExpr
pub fn column(index: usize) -> HirScalarExpr
Constructs a column reference in the current scope.
pub fn literal(datum: Datum<'_>, scalar_type: ScalarType) -> HirScalarExpr
pub fn literal_true() -> HirScalarExpr
pub fn literal_false() -> HirScalarExpr
pub fn literal_null(scalar_type: ScalarType) -> HirScalarExpr
pub fn literal_1d_array( datums: Vec<Datum<'_>>, element_scalar_type: ScalarType, ) -> Result<HirScalarExpr, PlanError>
pub fn as_literal(&self) -> Option<Datum<'_>>
pub fn is_literal_true(&self) -> bool
pub fn is_literal_false(&self) -> bool
pub fn is_literal_null(&self) -> bool
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Return true iff self consists only of constants, function calls, and
if-else statements.
pub fn call_unary(self, func: UnaryFunc) -> Self
pub fn call_binary(self, other: Self, func: BinaryFunc) -> Self
pub fn or(self, other: Self) -> Self
pub fn and(self, other: Self) -> Self
pub fn not(self) -> Self
pub fn call_is_null(self) -> Self
Sourcepub fn variadic_and(args: Vec<HirScalarExpr>) -> HirScalarExpr
pub fn variadic_and(args: Vec<HirScalarExpr>) -> HirScalarExpr
Calls AND with the given arguments. Simplifies if 0 or 1 args.
Sourcepub fn variadic_or(args: Vec<HirScalarExpr>) -> HirScalarExpr
pub fn variadic_or(args: Vec<HirScalarExpr>) -> HirScalarExpr
Calls OR with the given arguments. Simplifies if 0 or 1 args.
pub fn take(&mut self) -> Self
pub fn visit<'a, F>(&'a self, f: &mut F)where
F: FnMut(&'a Self),
pub fn visit1<'a, F>(&'a self, f: F)where
F: FnMut(&'a Self),
pub fn visit_mut<F>(&mut self, f: &mut F)where
F: FnMut(&mut Self),
Visit::visit_post instead.pub fn visit_mut_pre<F>(&mut self, f: &mut F)where
F: FnMut(&mut Self),
Visit::visit_mut_pre instead.pub fn visit1_mut<F>(&mut self, f: F)where
F: FnMut(&mut Self),
VisitChildren<HirScalarExpr>::visit_children instead.Sourcepub fn visit_pre_post<F1, F2>(&self, pre: &mut F1, post: &mut F2)
👎Deprecated: Use Visit::visit_pre_post instead.
pub fn visit_pre_post<F1, F2>(&self, pre: &mut F1, post: &mut F2)
Visit::visit_pre_post instead.A generalization of visit. The function pre runs on a
HirScalarExpr before it runs on any of the child HirScalarExprs.
The function post runs on child HirScalarExprs first before the
parent. Optionally, pre can return which child HirScalarExprs, if
any, should be visited (default is to visit all children).
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 scalar expression.
The depth argument should indicate the subquery nesting depth of the expression,
which will be incremented with each subquery entered 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 visit_columns_referring_to_root_level<F>(&self, f: &mut F)
pub fn visit_columns_referring_to_root_level<F>(&self, f: &mut F)
Visits those column references in this scalar expression that refer to the root
level. These include column references that are at the root level, as well as column
references that are at a deeper subquery nesting depth, but refer back to the root level.
(Note that even if self is embedded inside a larger expression, we consider the
“root level” to be self’s level.)
Sourcepub fn visit_columns_referring_to_root_level_mut<F>(&mut self, f: &mut F)
pub fn visit_columns_referring_to_root_level_mut<F>(&mut self, f: &mut F)
Like visit_columns_referring_to_root_level, but permits mutating the column references.
Sourcepub fn visit_recursively<F, E>(&self, depth: usize, f: &mut F) -> Result<(), E>
👎Deprecated: Redefine this based on the Visit and VisitChildren methods.
pub fn visit_recursively<F, E>(&self, depth: usize, f: &mut F) -> Result<(), E>
Visit and VisitChildren methods.Like visit but it enters the subqueries visiting the scalar expressions contained
in them. It takes the current depth of the expression and increases it when
entering a subquery.
Sourcepub fn visit_recursively_mut<F, E>(
&mut self,
depth: usize,
f: &mut F,
) -> Result<(), E>
👎Deprecated: Redefine this based on the Visit and VisitChildren methods.
pub fn visit_recursively_mut<F, E>( &mut self, depth: usize, f: &mut F, ) -> Result<(), E>
Visit and VisitChildren methods.Like visit_recursively, but permits mutating the scalar expressions.
fn simplify_to_literal(self) -> Option<Row>
Sourcepub fn into_literal_int64(self) -> Option<i64>
pub fn into_literal_int64(self) -> Option<i64>
Attempts to simplify this expression to a literal 64-bit integer.
Returns None if this expression cannot be simplified, e.g. because it
contains non-literal values.
§Panics
Panics if this expression does not have type ScalarType::Int64.
Sourcepub fn into_literal_string(self) -> Option<String>
pub fn into_literal_string(self) -> Option<String>
Attempts to simplify this expression to a literal string.
Returns None if this expression cannot be simplified, e.g. because it
contains non-literal values.
§Panics
Panics if this expression does not have type ScalarType::String.
Sourcepub fn into_literal_mz_timestamp(self) -> Option<Timestamp>
pub fn into_literal_mz_timestamp(self) -> Option<Timestamp>
Attempts to simplify this expression to a literal MzTimestamp.
Returns None if this expression cannot be simplified, e.g. because it
contains non-literal values.
TODO: Make this (and the other similar fns above) return Result, so that we can show the error when it fails. (E.g., there can be non-trivial cast errors.)
§Panics
Panics if this expression does not have type ScalarType::MzTimestamp.
Source§impl HirScalarExpr
impl HirScalarExpr
Sourcefn applied_to(
self,
id_gen: &mut IdGen,
col_map: &ColumnMap,
cte_map: &mut BTreeMap<LocalId, CteDesc>,
inner: &mut MirRelationExpr,
subquery_map: &Option<&BTreeMap<HirScalarExpr, usize>>,
context: &Context<'_>,
) -> Result<MirScalarExpr, PlanError>
fn applied_to( self, id_gen: &mut IdGen, col_map: &ColumnMap, cte_map: &mut BTreeMap<LocalId, CteDesc>, inner: &mut MirRelationExpr, subquery_map: &Option<&BTreeMap<HirScalarExpr, usize>>, context: &Context<'_>, ) -> Result<MirScalarExpr, PlanError>
Rewrite self into a mz_expr::ScalarExpr which can be applied to the modified inner.
This method is responsible for decorrelating subqueries in self by introducing further columns
to inner, and rewriting self to refer to its physical columns (specified by usize positions).
The most complicated logic is for the scalar expressions that involve subqueries, each of which are
documented in more detail closer to their logic.
This process presumes that inner is the result of decorrelation, meaning its first several columns
may be inherited from outer relations. The col_map column map should provide specific offsets where
each of these references can be found.
fn window_func_applied_to<F>(
id_gen: &mut IdGen,
col_map: &ColumnMap,
cte_map: &mut BTreeMap<LocalId, CteDesc>,
inner: &mut MirRelationExpr,
subquery_map: &Option<&BTreeMap<HirScalarExpr, usize>>,
partition_by: Vec<HirScalarExpr>,
order_by: Vec<HirScalarExpr>,
mir_aggr_func: AggregateFunc,
lower_args: F,
context: &Context<'_>,
) -> Result<MirScalarExpr, PlanError>where
F: FnOnce(&mut IdGen, &ColumnMap, &mut BTreeMap<LocalId, CteDesc>, &mut MirRelationExpr, &Option<&BTreeMap<HirScalarExpr, usize>>, Vec<MirScalarExpr>, MirScalarExpr, ScalarType) -> Result<(MirScalarExpr, ColumnType), PlanError>,
Sourcefn lower_subqueries(
exprs: &[Self],
id_gen: &mut IdGen,
col_map: &ColumnMap,
cte_map: &mut BTreeMap<LocalId, CteDesc>,
inner: MirRelationExpr,
context: &Context<'_>,
) -> Result<(MirRelationExpr, BTreeMap<HirScalarExpr, usize>), PlanError>
fn lower_subqueries( exprs: &[Self], id_gen: &mut IdGen, col_map: &ColumnMap, cte_map: &mut BTreeMap<LocalId, CteDesc>, inner: MirRelationExpr, context: &Context<'_>, ) -> Result<(MirRelationExpr, BTreeMap<HirScalarExpr, usize>), PlanError>
Applies the subqueries in the given list of scalar expressions to every distinct value of the given relation and returns a join of the given relation with all the subqueries found, and the mapping of scalar expressions with columns projected by the returned join that will hold their results.
Rewrites self into a mz_expr::ScalarExpr.
Trait Implementations§
Source§impl AbstractExpr for HirScalarExpr
impl AbstractExpr for HirScalarExpr
type Type = ColumnType
Source§fn typ(
&self,
outers: &[RelationType],
inner: &RelationType,
params: &BTreeMap<usize, ScalarType>,
) -> Self::Type
fn typ( &self, outers: &[RelationType], inner: &RelationType, params: &BTreeMap<usize, ScalarType>, ) -> Self::Type
Source§impl Clone for HirScalarExpr
impl Clone for HirScalarExpr
Source§fn clone(&self) -> HirScalarExpr
fn clone(&self) -> HirScalarExpr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HirScalarExpr
impl Debug for HirScalarExpr
Source§impl<'de> Deserialize<'de> for HirScalarExpr
impl<'de> Deserialize<'de> for HirScalarExpr
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 Display for HirScalarExpr
impl Display for HirScalarExpr
Source§impl From<HirScalarExpr> for CoercibleScalarExpr
impl From<HirScalarExpr> for CoercibleScalarExpr
Source§fn from(expr: HirScalarExpr) -> CoercibleScalarExpr
fn from(expr: HirScalarExpr) -> CoercibleScalarExpr
Source§impl Hash for HirScalarExpr
impl Hash for HirScalarExpr
Source§impl Ord for HirScalarExpr
impl Ord for HirScalarExpr
Source§fn cmp(&self, other: &HirScalarExpr) -> Ordering
fn cmp(&self, other: &HirScalarExpr) -> 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 HirScalarExpr
impl PartialEq for HirScalarExpr
Source§impl PartialOrd for HirScalarExpr
impl PartialOrd for HirScalarExpr
Source§impl ScalarOps for HirScalarExpr
impl ScalarOps for HirScalarExpr
fn match_col_ref(&self) -> Option<usize>
fn references(&self, column: usize) -> bool
Source§impl Serialize for HirScalarExpr
impl Serialize for HirScalarExpr
Source§impl VisitChildren<HirScalarExpr> for AggregateWindowExpr
impl VisitChildren<HirScalarExpr> for AggregateWindowExpr
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 moreSource§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 moreSource§impl VisitChildren<HirScalarExpr> for HirScalarExpr
impl VisitChildren<HirScalarExpr> for HirScalarExpr
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 ValueWindowExpr
impl VisitChildren<HirScalarExpr> for ValueWindowExpr
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 moreSource§impl VisitChildren<HirScalarExpr> for WindowExpr
impl VisitChildren<HirScalarExpr> for WindowExpr
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 moreSource§impl VisitChildren<HirScalarExpr> for WindowExprType
impl VisitChildren<HirScalarExpr> for WindowExprType
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 HirScalarExpr
impl StructuralPartialEq for HirScalarExpr
Auto Trait Implementations§
impl Freeze for HirScalarExpr
impl RefUnwindSafe for HirScalarExpr
impl Send for HirScalarExpr
impl Sync for HirScalarExpr
impl Unpin for HirScalarExpr
impl UnwindSafe for HirScalarExpr
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§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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::RequestSource§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