pub enum ExprImpl {
CorrelatedInputRef(Box<CorrelatedInputRef>),
InputRef(Box<InputRef>),
Literal(Box<Literal>),
FunctionCall(Box<FunctionCall>),
FunctionCallWithLambda(Box<FunctionCallWithLambda>),
AggCall(Box<AggCall>),
Subquery(Box<Subquery>),
TableFunction(Box<TableFunction>),
WindowFunction(Box<WindowFunction>),
UserDefinedFunction(Box<UserDefinedFunction>),
Parameter(Box<Parameter>),
Now(Box<Now>),
}Variants§
InputRef(Box<InputRef>)
Literal(Box<Literal>)
FunctionCall(Box<FunctionCall>)
FunctionCallWithLambda(Box<FunctionCallWithLambda>)
AggCall(Box<AggCall>)
Subquery(Box<Subquery>)
TableFunction(Box<TableFunction>)
WindowFunction(Box<WindowFunction>)
UserDefinedFunction(Box<UserDefinedFunction>)
Parameter(Box<Parameter>)
Now(Box<Now>)
Implementations§
Source§impl ExprImpl
impl ExprImpl
Returns true if this is a ExprImpl::CorrelatedInputRef, otherwise false
Optionally returns mutable references to the inner fields if this is a ExprImpl::CorrelatedInputRef, otherwise None
Optionally returns references to the inner fields if this is a ExprImpl::CorrelatedInputRef, otherwise None
Returns the inner fields if this is a ExprImpl::CorrelatedInputRef, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_input_ref(&self) -> bool
pub fn is_input_ref(&self) -> bool
Returns true if this is a ExprImpl::InputRef, otherwise false
Sourcepub fn as_input_ref_mut(&mut self) -> Option<&mut Box<InputRef>>
pub fn as_input_ref_mut(&mut self) -> Option<&mut Box<InputRef>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::InputRef, otherwise None
Sourcepub fn as_input_ref(&self) -> Option<&Box<InputRef>>
pub fn as_input_ref(&self) -> Option<&Box<InputRef>>
Optionally returns references to the inner fields if this is a ExprImpl::InputRef, otherwise None
Sourcepub fn into_input_ref(self) -> Result<Box<InputRef>, Self>
pub fn into_input_ref(self) -> Result<Box<InputRef>, Self>
Returns the inner fields if this is a ExprImpl::InputRef, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Returns true if this is a ExprImpl::Literal, otherwise false
Sourcepub fn as_literal_mut(&mut self) -> Option<&mut Box<Literal>>
pub fn as_literal_mut(&mut self) -> Option<&mut Box<Literal>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::Literal, otherwise None
Sourcepub fn as_literal(&self) -> Option<&Box<Literal>>
pub fn as_literal(&self) -> Option<&Box<Literal>>
Optionally returns references to the inner fields if this is a ExprImpl::Literal, otherwise None
Sourcepub fn into_literal(self) -> Result<Box<Literal>, Self>
pub fn into_literal(self) -> Result<Box<Literal>, Self>
Returns the inner fields if this is a ExprImpl::Literal, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_function_call(&self) -> bool
pub fn is_function_call(&self) -> bool
Returns true if this is a ExprImpl::FunctionCall, otherwise false
Sourcepub fn as_function_call_mut(&mut self) -> Option<&mut Box<FunctionCall>>
pub fn as_function_call_mut(&mut self) -> Option<&mut Box<FunctionCall>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::FunctionCall, otherwise None
Sourcepub fn as_function_call(&self) -> Option<&Box<FunctionCall>>
pub fn as_function_call(&self) -> Option<&Box<FunctionCall>>
Optionally returns references to the inner fields if this is a ExprImpl::FunctionCall, otherwise None
Sourcepub fn into_function_call(self) -> Result<Box<FunctionCall>, Self>
pub fn into_function_call(self) -> Result<Box<FunctionCall>, Self>
Returns the inner fields if this is a ExprImpl::FunctionCall, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_function_call_with_lambda(&self) -> bool
pub fn is_function_call_with_lambda(&self) -> bool
Returns true if this is a ExprImpl::FunctionCallWithLambda, otherwise false
Sourcepub fn as_function_call_with_lambda_mut(
&mut self,
) -> Option<&mut Box<FunctionCallWithLambda>>
pub fn as_function_call_with_lambda_mut( &mut self, ) -> Option<&mut Box<FunctionCallWithLambda>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::FunctionCallWithLambda, otherwise None
Sourcepub fn as_function_call_with_lambda(
&self,
) -> Option<&Box<FunctionCallWithLambda>>
pub fn as_function_call_with_lambda( &self, ) -> Option<&Box<FunctionCallWithLambda>>
Optionally returns references to the inner fields if this is a ExprImpl::FunctionCallWithLambda, otherwise None
Sourcepub fn into_function_call_with_lambda(
self,
) -> Result<Box<FunctionCallWithLambda>, Self>
pub fn into_function_call_with_lambda( self, ) -> Result<Box<FunctionCallWithLambda>, Self>
Returns the inner fields if this is a ExprImpl::FunctionCallWithLambda, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_agg_call(&self) -> bool
pub fn is_agg_call(&self) -> bool
Returns true if this is a ExprImpl::AggCall, otherwise false
Sourcepub fn as_agg_call_mut(&mut self) -> Option<&mut Box<AggCall>>
pub fn as_agg_call_mut(&mut self) -> Option<&mut Box<AggCall>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::AggCall, otherwise None
Sourcepub fn as_agg_call(&self) -> Option<&Box<AggCall>>
pub fn as_agg_call(&self) -> Option<&Box<AggCall>>
Optionally returns references to the inner fields if this is a ExprImpl::AggCall, otherwise None
Sourcepub fn into_agg_call(self) -> Result<Box<AggCall>, Self>
pub fn into_agg_call(self) -> Result<Box<AggCall>, Self>
Returns the inner fields if this is a ExprImpl::AggCall, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_subquery(&self) -> bool
pub fn is_subquery(&self) -> bool
Returns true if this is a ExprImpl::Subquery, otherwise false
Sourcepub fn as_subquery_mut(&mut self) -> Option<&mut Box<Subquery>>
pub fn as_subquery_mut(&mut self) -> Option<&mut Box<Subquery>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::Subquery, otherwise None
Sourcepub fn as_subquery(&self) -> Option<&Box<Subquery>>
pub fn as_subquery(&self) -> Option<&Box<Subquery>>
Optionally returns references to the inner fields if this is a ExprImpl::Subquery, otherwise None
Sourcepub fn into_subquery(self) -> Result<Box<Subquery>, Self>
pub fn into_subquery(self) -> Result<Box<Subquery>, Self>
Returns the inner fields if this is a ExprImpl::Subquery, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_table_function(&self) -> bool
pub fn is_table_function(&self) -> bool
Returns true if this is a ExprImpl::TableFunction, otherwise false
Sourcepub fn as_table_function_mut(&mut self) -> Option<&mut Box<TableFunction>>
pub fn as_table_function_mut(&mut self) -> Option<&mut Box<TableFunction>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::TableFunction, otherwise None
Sourcepub fn as_table_function(&self) -> Option<&Box<TableFunction>>
pub fn as_table_function(&self) -> Option<&Box<TableFunction>>
Optionally returns references to the inner fields if this is a ExprImpl::TableFunction, otherwise None
Sourcepub fn into_table_function(self) -> Result<Box<TableFunction>, Self>
pub fn into_table_function(self) -> Result<Box<TableFunction>, Self>
Returns the inner fields if this is a ExprImpl::TableFunction, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_window_function(&self) -> bool
pub fn is_window_function(&self) -> bool
Returns true if this is a ExprImpl::WindowFunction, otherwise false
Sourcepub fn as_window_function_mut(&mut self) -> Option<&mut Box<WindowFunction>>
pub fn as_window_function_mut(&mut self) -> Option<&mut Box<WindowFunction>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::WindowFunction, otherwise None
Sourcepub fn as_window_function(&self) -> Option<&Box<WindowFunction>>
pub fn as_window_function(&self) -> Option<&Box<WindowFunction>>
Optionally returns references to the inner fields if this is a ExprImpl::WindowFunction, otherwise None
Sourcepub fn into_window_function(self) -> Result<Box<WindowFunction>, Self>
pub fn into_window_function(self) -> Result<Box<WindowFunction>, Self>
Returns the inner fields if this is a ExprImpl::WindowFunction, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_user_defined_function(&self) -> bool
pub fn is_user_defined_function(&self) -> bool
Returns true if this is a ExprImpl::UserDefinedFunction, otherwise false
Sourcepub fn as_user_defined_function_mut(
&mut self,
) -> Option<&mut Box<UserDefinedFunction>>
pub fn as_user_defined_function_mut( &mut self, ) -> Option<&mut Box<UserDefinedFunction>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::UserDefinedFunction, otherwise None
Sourcepub fn as_user_defined_function(&self) -> Option<&Box<UserDefinedFunction>>
pub fn as_user_defined_function(&self) -> Option<&Box<UserDefinedFunction>>
Optionally returns references to the inner fields if this is a ExprImpl::UserDefinedFunction, otherwise None
Sourcepub fn into_user_defined_function(
self,
) -> Result<Box<UserDefinedFunction>, Self>
pub fn into_user_defined_function( self, ) -> Result<Box<UserDefinedFunction>, Self>
Returns the inner fields if this is a ExprImpl::UserDefinedFunction, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_parameter(&self) -> bool
pub fn is_parameter(&self) -> bool
Returns true if this is a ExprImpl::Parameter, otherwise false
Sourcepub fn as_parameter_mut(&mut self) -> Option<&mut Box<Parameter>>
pub fn as_parameter_mut(&mut self) -> Option<&mut Box<Parameter>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::Parameter, otherwise None
Sourcepub fn as_parameter(&self) -> Option<&Box<Parameter>>
pub fn as_parameter(&self) -> Option<&Box<Parameter>>
Optionally returns references to the inner fields if this is a ExprImpl::Parameter, otherwise None
Sourcepub fn into_parameter(self) -> Result<Box<Parameter>, Self>
pub fn into_parameter(self) -> Result<Box<Parameter>, Self>
Returns the inner fields if this is a ExprImpl::Parameter, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_now_mut(&mut self) -> Option<&mut Box<Now>>
pub fn as_now_mut(&mut self) -> Option<&mut Box<Now>>
Optionally returns mutable references to the inner fields if this is a ExprImpl::Now, otherwise None
Source§impl ExprImpl
impl ExprImpl
Sourcepub fn literal_int(v: i32) -> Self
pub fn literal_int(v: i32) -> Self
A literal int value.
Sourcepub fn literal_bigint(v: i64) -> Self
pub fn literal_bigint(v: i64) -> Self
A literal bigint value
Sourcepub fn literal_f64(v: f64) -> Self
pub fn literal_f64(v: f64) -> Self
A literal float64 value.
Sourcepub fn literal_bool(v: bool) -> Self
pub fn literal_bool(v: bool) -> Self
A literal boolean value.
Sourcepub fn literal_varchar(v: String) -> Self
pub fn literal_varchar(v: String) -> Self
A literal varchar value.
Sourcepub fn literal_null(element_type: DataType) -> Self
pub fn literal_null(element_type: DataType) -> Self
A literal null value.
Sourcepub fn literal_jsonb(v: JsonbVal) -> Self
pub fn literal_jsonb(v: JsonbVal) -> Self
A literal jsonb value.
Sourcepub fn literal_list(v: ListValue, element_type: DataType) -> Self
pub fn literal_list(v: ListValue, element_type: DataType) -> Self
A literal list value.
Sourcepub fn take(&mut self) -> Self
pub fn take(&mut self) -> Self
Takes the expression, leaving a literal null of the same type in its place.
Sourcepub fn count_star() -> Self
pub fn count_star() -> Self
A count(*) aggregate function.
Sourcepub fn and(exprs: impl IntoIterator<Item = ExprImpl>) -> Self
pub fn and(exprs: impl IntoIterator<Item = ExprImpl>) -> Self
Create a new expression by merging the given expressions by And.
If exprs is empty, return a literal true.
Sourcepub fn or(exprs: impl IntoIterator<Item = ExprImpl>) -> Self
pub fn or(exprs: impl IntoIterator<Item = ExprImpl>) -> Self
Create a new expression by merging the given expressions by Or.
If exprs is empty, return a literal false.
Sourcepub fn collect_input_refs(&self, input_col_num: usize) -> FixedBitSet
pub fn collect_input_refs(&self, input_col_num: usize) -> FixedBitSet
Sourcepub fn is_pure(&self) -> bool
pub fn is_pure(&self) -> bool
Check if the expression has no side effects and output is deterministic
pub fn is_impure(&self) -> bool
Sourcepub fn count_nows(&self) -> usize
pub fn count_nows(&self) -> usize
Count Nows in the expression.
Sourcepub fn is_untyped(&self) -> bool
pub fn is_untyped(&self) -> bool
Check whether self is a literal NULL or literal string.
Sourcepub fn cast_implicit(self, target: &DataType) -> Result<ExprImpl, CastError>
pub fn cast_implicit(self, target: &DataType) -> Result<ExprImpl, CastError>
Shorthand to create cast expr to target type in implicit context.
Sourcepub fn cast_assign(self, target: &DataType) -> Result<ExprImpl, CastError>
pub fn cast_assign(self, target: &DataType) -> Result<ExprImpl, CastError>
Shorthand to create cast expr to target type in assign context.
Sourcepub fn cast_explicit(self, target: &DataType) -> Result<ExprImpl, CastError>
pub fn cast_explicit(self, target: &DataType) -> Result<ExprImpl, CastError>
Shorthand to create cast expr to target type in explicit context.
Sourcepub fn cast_implicit_mut(&mut self, target: &DataType) -> Result<(), CastError>
pub fn cast_implicit_mut(&mut self, target: &DataType) -> Result<(), CastError>
Shorthand to inplace cast expr to target type in implicit context.
Sourcepub fn cast_explicit_mut(&mut self, target: &DataType) -> Result<(), CastError>
pub fn cast_explicit_mut(&mut self, target: &DataType) -> Result<(), CastError>
Shorthand to inplace cast expr to target type in explicit context.
Sourcepub fn cast_to_regclass(self) -> Result<ExprImpl, CastError>
pub fn cast_to_regclass(self) -> Result<ExprImpl, CastError>
Casting to Regclass type means getting the oid of expr. See https://www.postgresql.org/docs/current/datatype-oid.html
Sourcepub fn cast_to_regclass_mut(&mut self) -> Result<(), CastError>
pub fn cast_to_regclass_mut(&mut self) -> Result<(), CastError>
Shorthand to inplace cast expr to regclass type.
Sourcepub fn ensure_array_type(&self) -> Result<(), ErrorCode>
pub fn ensure_array_type(&self) -> Result<(), ErrorCode>
Ensure the return type of this expression is an array of some type.
Sourcepub fn try_into_map_type(&self) -> Result<MapType, ErrorCode>
pub fn try_into_map_type(&self) -> Result<MapType, ErrorCode>
Ensure the return type of this expression is a map of some type.
Sourcepub fn enforce_bool_clause(self, clause: &str) -> RwResult<ExprImpl>
pub fn enforce_bool_clause(self, clause: &str) -> RwResult<ExprImpl>
Shorthand to enforce implicit cast to boolean
Sourcepub fn cast_output(self) -> RwResult<ExprImpl>
pub fn cast_output(self) -> RwResult<ExprImpl>
Create “cast” expr to string (varchar) type. This is different from a real cast, as
boolean is converted to a single char rather than full word.
Choose between cast_output and cast_{assign,explicit}(Varchar) based on PostgreSQL’s
behavior on bools. For example, concat(':', true) is :t but ':' || true is :true.
All other types have the same behavior when formatting to output and casting to string.
References in PostgreSQL:
Sourcepub async fn eval_row(&self, input: &OwnedRow) -> RwResult<Datum>
pub async fn eval_row(&self, input: &OwnedRow) -> RwResult<Datum>
Evaluate the expression on the given input.
TODO: This is a naive implementation. We should avoid proto ser/de. Tracking issue: https://github.com/risingwavelabs/risingwave/issues/3479
Sourcepub fn try_fold_const(&self) -> Option<RwResult<Datum>>
pub fn try_fold_const(&self) -> Option<RwResult<Datum>>
Try to evaluate an expression if it’s a constant expression by ExprImpl::is_const.
Returns…
Noneif it’s not a constant expression,Some(Ok(_))if constant evaluation succeeds,Some(Err(_))if there’s an error while evaluating a constant expression.
Sourcepub fn fold_const(&self) -> RwResult<Datum>
pub fn fold_const(&self) -> RwResult<Datum>
Similar to ExprImpl::try_fold_const, but panics if the expression is not constant.
Source§impl ExprImpl
impl ExprImpl
pub fn has_input_ref(&self) -> bool
pub fn has_literal(&self) -> bool
pub fn has_function_call(&self) -> bool
pub fn has_function_call_with_lambda(&self) -> bool
pub fn has_agg_call(&self) -> bool
pub fn has_subquery(&self) -> bool
pub fn has_table_function(&self) -> bool
pub fn has_window_function(&self) -> bool
pub fn has_user_defined_function(&self) -> bool
pub fn has_now(&self) -> bool
Source§impl ExprImpl
impl ExprImpl
This function is not meant to be called. In most cases you would want
ExprImpl::has_correlated_input_ref_by_depth.
When an expr contains a CorrelatedInputRef with lower depth, the whole expr is still
considered to be uncorrelated, and can be checked with ExprImpl::has_subquery as well.
See examples on crate::binder::BoundQuery::is_correlated_by_depth for details.
This is a placeholder to trigger a compiler error when a trivial implementation checking for
enum variant is generated by accident. It cannot be called either because you cannot pass
Infallible to it.
Used to check whether the expression has CorrelatedInputRef.
This is the core logic that supports crate::binder::BoundQuery::is_correlated_by_depth. Check the
doc of it for examples of depth being equal, less or greater.
Collect CorrelatedInputRefs in ExprImpl by relative depth, return their indices, and
assign absolute correlated_id for them.
pub fn only_literal_and_func(&self) -> bool
Sourcepub fn is_const(&self) -> bool
pub fn is_const(&self) -> bool
Checks whether this is a constant expr that can be evaluated over a dummy chunk.
The expression tree should only consist of literals and pure function calls.
Sourcepub fn as_eq_cond(&self) -> Option<(InputRef, InputRef)>
pub fn as_eq_cond(&self) -> Option<(InputRef, InputRef)>
Returns the InputRefs of an Equality predicate if it matches
ordered by the canonical ordering (lower, higher), else returns None
pub fn as_is_not_distinct_from_cond(&self) -> Option<(InputRef, InputRef)>
pub fn reverse_comparison(comparison: ExprType) -> ExprType
pub fn as_comparison_cond(&self) -> Option<(InputRef, ExprType, InputRef)>
Sourcepub fn as_now_comparison_cond(&self) -> Option<(ExprImpl, ExprType, ExprImpl)>
pub fn as_now_comparison_cond(&self) -> Option<(ExprImpl, ExprType, ExprImpl)>
Accepts expressions of the form input_expr cmp now_expr or now_expr cmp input_expr,
where input_expr contains an InputRef and contains no now(), and now_expr
contains a now() but no InputRef.
Canonicalizes to the first ordering and returns (input_expr, cmp, now_expr)
Sourcepub(crate) fn as_input_comparison_cond(&self) -> Option<InequalityInputPair>
pub(crate) fn as_input_comparison_cond(&self) -> Option<InequalityInputPair>
Accepts expressions of the form InputRef cmp InputRef [+- const_expr] or
InputRef [+- const_expr] cmp InputRef.
Sourcefn as_input_offset(&self) -> Option<(usize, Option<(ExprType, ExprImpl)>)>
fn as_input_offset(&self) -> Option<(usize, Option<(ExprType, ExprImpl)>)>
Returns the InputRef and offset of a predicate if it matches
the form InputRef [+- const_expr], else returns None.
pub fn as_eq_const(&self) -> Option<(InputRef, ExprImpl)>
pub fn as_is_null(&self) -> Option<InputRef>
pub fn as_comparison_const(&self) -> Option<(InputRef, ExprType, ExprImpl)>
pub fn as_in_const_list(&self) -> Option<(InputRef, Vec<ExprImpl>)>
pub fn as_or_disjunctions(&self) -> Option<Vec<ExprImpl>>
pub fn to_project_set_select_item_proto(&self) -> ProjectSetSelectItem
pub fn from_expr_proto(proto: &ExprNode) -> RwResult<Self>
Trait Implementations§
Source§impl Debug for ExprImpl
A custom Debug implementation that is more concise and suitable to use with
std::fmt::Formatter::debug_list in plan nodes. If the verbose output is preferred, it is
still available via {:#?}.
impl Debug for ExprImpl
A custom Debug implementation that is more concise and suitable to use with
std::fmt::Formatter::debug_list in plan nodes. If the verbose output is preferred, it is
still available via {:#?}.
Source§impl Expr for ExprImpl
impl Expr for ExprImpl
Source§fn return_type(&self) -> DataType
fn return_type(&self) -> DataType
Source§fn try_to_expr_proto(&self) -> Result<ExprNode, String>
fn try_to_expr_proto(&self) -> Result<ExprNode, String>
Source§fn to_expr_proto(&self) -> ExprNode
fn to_expr_proto(&self) -> ExprNode
Source§fn from(o: CorrelatedInputRef) -> ExprImpl
fn from(o: CorrelatedInputRef) -> ExprImpl
Source§impl From<FunctionCall> for ExprImpl
impl From<FunctionCall> for ExprImpl
Source§fn from(o: FunctionCall) -> ExprImpl
fn from(o: FunctionCall) -> ExprImpl
Source§impl From<FunctionCallWithLambda> for ExprImpl
impl From<FunctionCallWithLambda> for ExprImpl
Source§fn from(o: FunctionCallWithLambda) -> ExprImpl
fn from(o: FunctionCallWithLambda) -> ExprImpl
Source§impl From<TableFunction> for ExprImpl
impl From<TableFunction> for ExprImpl
Source§fn from(o: TableFunction) -> ExprImpl
fn from(o: TableFunction) -> ExprImpl
Source§impl From<UserDefinedFunction> for ExprImpl
impl From<UserDefinedFunction> for ExprImpl
Source§fn from(o: UserDefinedFunction) -> ExprImpl
fn from(o: UserDefinedFunction) -> ExprImpl
Source§impl From<WindowFunction> for ExprImpl
impl From<WindowFunction> for ExprImpl
Source§fn from(o: WindowFunction) -> ExprImpl
fn from(o: WindowFunction) -> ExprImpl
impl Eq for ExprImpl
impl StructuralPartialEq for ExprImpl
Auto Trait Implementations§
impl Freeze for ExprImpl
impl !RefUnwindSafe for ExprImpl
impl Send for ExprImpl
impl Sync for ExprImpl
impl Unpin for ExprImpl
impl !UnwindSafe for ExprImpl
Blanket Implementations§
§impl<T> AsAny for T
impl<T> AsAny for T
§fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
dyn Any reference to the object: Read more§fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send>
Arc<dyn Any> reference to the object: Read more§fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Box<dyn Any>: Read more§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level].§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n].§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n] with metric_level set to
MetricLevel::Debug and relabel_num set to 1.§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SameOrElseExt for Twhere
T: Eq,
impl<T> SameOrElseExt for Twhere
T: Eq,
§fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
self and other are equal, if so, return self, otherwise return the result of f().§impl<T> Scope for T
impl<T> Scope for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.