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 Now
s 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) -> Result<ExprImpl, RwError>
pub fn enforce_bool_clause(self, clause: &str) -> Result<ExprImpl, RwError>
Shorthand to enforce implicit cast to boolean
sourcepub fn cast_output(self) -> Result<ExprImpl, RwError>
pub fn cast_output(self) -> Result<ExprImpl, RwError>
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) -> Result<Datum, RwError>
pub async fn eval_row(&self, input: &OwnedRow) -> Result<Datum, RwError>
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<Result<Datum, RwError>>
pub fn try_fold_const(&self) -> Option<Result<Datum, RwError>>
Try to evaluate an expression if it’s a constant expression by ExprImpl::is_const
.
Returns…
None
if 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) -> Result<Datum, RwError>
pub fn fold_const(&self) -> Result<Datum, RwError>
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_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
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
. Check the
doc of it for examples of depth
being equal, less or greater.
Collect CorrelatedInputRef
s in ExprImpl
by relative depth
, return their indices, and
assign absolute correlated_id
for them.
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) -> Result<Self, RwError>
Trait Implementations§
source§impl Debug for ExprImpl
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 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§
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Conv for T
impl<T> Conv for T
§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
§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>
. Box<dyn Any>
can
then be further downcast
into Box<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>
. Rc<Any>
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> 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
§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<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<T, U, I> LiftInto<U, I> for Twhere
U: LiftFrom<T, I>,
impl<T, U, I> LiftInto<U, I> for Twhere
U: LiftFrom<T, I>,
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§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
.source§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
.source§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<Source> Sculptor<HNil, HNil> for Source
impl<Source> Sculptor<HNil, HNil> for Source
§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.