risingwave_frontend::expr

Enum ExprImpl

source
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§

§

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>)

Implementations§

source§

impl ExprImpl

source

pub fn is_correlated_input_ref(&self) -> bool

Returns true if this is a ExprImpl::CorrelatedInputRef, otherwise false

source

pub fn as_correlated_input_ref_mut( &mut self, ) -> Option<&mut Box<CorrelatedInputRef>>

Optionally returns mutable references to the inner fields if this is a ExprImpl::CorrelatedInputRef, otherwise None

source

pub fn as_correlated_input_ref(&self) -> Option<&Box<CorrelatedInputRef>>

Optionally returns references to the inner fields if this is a ExprImpl::CorrelatedInputRef, otherwise None

source

pub fn into_correlated_input_ref(self) -> Result<Box<CorrelatedInputRef>, Self>

Returns the inner fields if this is a ExprImpl::CorrelatedInputRef, otherwise returns back the enum in the Err case of the result

source

pub fn is_input_ref(&self) -> bool

Returns true if this is a ExprImpl::InputRef, otherwise false

source

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

source

pub fn as_input_ref(&self) -> Option<&Box<InputRef>>

Optionally returns references to the inner fields if this is a ExprImpl::InputRef, otherwise None

source

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

source

pub fn is_literal(&self) -> bool

Returns true if this is a ExprImpl::Literal, otherwise false

source

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

source

pub fn as_literal(&self) -> Option<&Box<Literal>>

Optionally returns references to the inner fields if this is a ExprImpl::Literal, otherwise None

source

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

source

pub fn is_function_call(&self) -> bool

Returns true if this is a ExprImpl::FunctionCall, otherwise false

source

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

source

pub fn as_function_call(&self) -> Option<&Box<FunctionCall>>

Optionally returns references to the inner fields if this is a ExprImpl::FunctionCall, otherwise None

source

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

source

pub fn is_function_call_with_lambda(&self) -> bool

Returns true if this is a ExprImpl::FunctionCallWithLambda, otherwise false

source

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

source

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

source

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

source

pub fn is_agg_call(&self) -> bool

Returns true if this is a ExprImpl::AggCall, otherwise false

source

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

source

pub fn as_agg_call(&self) -> Option<&Box<AggCall>>

Optionally returns references to the inner fields if this is a ExprImpl::AggCall, otherwise None

source

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

source

pub fn is_subquery(&self) -> bool

Returns true if this is a ExprImpl::Subquery, otherwise false

source

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

source

pub fn as_subquery(&self) -> Option<&Box<Subquery>>

Optionally returns references to the inner fields if this is a ExprImpl::Subquery, otherwise None

source

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

source

pub fn is_table_function(&self) -> bool

Returns true if this is a ExprImpl::TableFunction, otherwise false

source

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

source

pub fn as_table_function(&self) -> Option<&Box<TableFunction>>

Optionally returns references to the inner fields if this is a ExprImpl::TableFunction, otherwise None

source

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

source

pub fn is_window_function(&self) -> bool

Returns true if this is a ExprImpl::WindowFunction, otherwise false

source

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

source

pub fn as_window_function(&self) -> Option<&Box<WindowFunction>>

Optionally returns references to the inner fields if this is a ExprImpl::WindowFunction, otherwise None

source

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

source

pub fn is_user_defined_function(&self) -> bool

Returns true if this is a ExprImpl::UserDefinedFunction, otherwise false

source

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

source

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

source

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

source

pub fn is_parameter(&self) -> bool

Returns true if this is a ExprImpl::Parameter, otherwise false

source

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

source

pub fn as_parameter(&self) -> Option<&Box<Parameter>>

Optionally returns references to the inner fields if this is a ExprImpl::Parameter, otherwise None

source

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

source

pub fn is_now(&self) -> bool

Returns true if this is a ExprImpl::Now, otherwise false

source

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

pub fn as_now(&self) -> Option<&Box<Now>>

Optionally returns references to the inner fields if this is a ExprImpl::Now, otherwise None

source

pub fn into_now(self) -> Result<Box<Now>, Self>

Returns the inner fields if this is a ExprImpl::Now, otherwise returns back the enum in the Err case of the result

source§

impl ExprImpl

source

pub fn variant_name(&self) -> &'static str

source§

impl ExprImpl

source

pub fn literal_int(v: i32) -> Self

A literal int value.

source

pub fn literal_bigint(v: i64) -> Self

A literal bigint value

source

pub fn literal_f64(v: f64) -> Self

A literal float64 value.

source

pub fn literal_bool(v: bool) -> Self

A literal boolean value.

source

pub fn literal_varchar(v: String) -> Self

A literal varchar value.

source

pub fn literal_null(element_type: DataType) -> Self

A literal null value.

source

pub fn literal_jsonb(v: JsonbVal) -> Self

A literal jsonb value.

source

pub fn literal_list(v: ListValue, element_type: DataType) -> Self

A literal list value.

source

pub fn take(&mut self) -> Self

Takes the expression, leaving a literal null of the same type in its place.

source

pub fn count_star() -> Self

A count(*) aggregate function.

source

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.

source

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.

source

pub fn collect_input_refs(&self, input_col_num: usize) -> FixedBitSet

Collect all InputRefs’ indexes in the expression.

§Panics

Panics if input_ref >= input_col_num.

source

pub fn is_pure(&self) -> bool

Check if the expression has no side effects and output is deterministic

source

pub fn is_impure(&self) -> bool

source

pub fn count_nows(&self) -> usize

Count Nows in the expression.

source

pub fn is_null(&self) -> bool

Check whether self is literal NULL.

source

pub fn is_untyped(&self) -> bool

Check whether self is a literal NULL or literal string.

source

pub fn cast_implicit(self, target: DataType) -> Result<ExprImpl, CastError>

Shorthand to create cast expr to target type in implicit context.

source

pub fn cast_assign(self, target: DataType) -> Result<ExprImpl, CastError>

Shorthand to create cast expr to target type in assign context.

source

pub fn cast_explicit(self, target: DataType) -> Result<ExprImpl, CastError>

Shorthand to create cast expr to target type in explicit context.

source

pub fn cast_implicit_mut(&mut self, target: DataType) -> Result<(), CastError>

Shorthand to inplace cast expr to target type in implicit context.

source

pub fn cast_explicit_mut(&mut self, target: DataType) -> Result<(), CastError>

Shorthand to inplace cast expr to target type in explicit context.

source

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

source

pub fn cast_to_regclass_mut(&mut self) -> Result<(), CastError>

Shorthand to inplace cast expr to regclass type.

source

pub fn ensure_array_type(&self) -> Result<(), ErrorCode>

Ensure the return type of this expression is an array of some type.

source

pub fn try_into_map_type(&self) -> Result<MapType, ErrorCode>

Ensure the return type of this expression is a map of some type.

source

pub fn enforce_bool_clause(self, clause: &str) -> Result<ExprImpl, RwError>

Shorthand to enforce implicit cast to boolean

source

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:

source

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

source

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.
source

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

source

pub fn has_input_ref(&self) -> bool

source

pub fn has_literal(&self) -> bool

source

pub fn has_function_call(&self) -> bool

source

pub fn has_function_call_with_lambda(&self) -> bool

source

pub fn has_agg_call(&self) -> bool

source

pub fn has_subquery(&self) -> bool

source

pub fn has_table_function(&self) -> bool

source

pub fn has_window_function(&self) -> bool

source

pub fn has_now(&self) -> bool

source§

impl ExprImpl

source

pub fn has_correlated_input_ref(&self, _: Infallible) -> bool

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.

source

pub fn has_correlated_input_ref_by_depth(&self, depth: Depth) -> bool

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.

source

pub fn has_correlated_input_ref_by_correlated_id( &self, correlated_id: CorrelatedId, ) -> bool

source

pub fn collect_correlated_indices_by_depth_and_assign_id( &mut self, depth: Depth, correlated_id: CorrelatedId, ) -> Vec<usize>

Collect CorrelatedInputRefs in ExprImpl by relative depth, return their indices, and assign absolute correlated_id for them.

source

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.

source

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

source

pub fn as_is_not_distinct_from_cond(&self) -> Option<(InputRef, InputRef)>

source

pub fn reverse_comparison(comparison: ExprType) -> ExprType

source

pub fn as_comparison_cond(&self) -> Option<(InputRef, ExprType, InputRef)>

source

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)

source

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.

source

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.

source

pub fn as_eq_const(&self) -> Option<(InputRef, ExprImpl)>

source

pub fn as_eq_correlated_input_ref( &self, ) -> Option<(InputRef, CorrelatedInputRef)>

source

pub fn as_is_null(&self) -> Option<InputRef>

source

pub fn as_comparison_const(&self) -> Option<(InputRef, ExprType, ExprImpl)>

source

pub fn as_in_const_list(&self) -> Option<(InputRef, Vec<ExprImpl>)>

source

pub fn as_or_disjunctions(&self) -> Option<Vec<ExprImpl>>

source

pub fn to_project_set_select_item_proto(&self) -> ProjectSetSelectItem

source

pub fn from_expr_proto(proto: &ExprNode) -> Result<Self, RwError>

Trait Implementations§

source§

impl Clone for ExprImpl

source§

fn clone(&self) -> ExprImpl

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
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 {:#?}.

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Expr for ExprImpl

source§

fn return_type(&self) -> DataType

Get the return type of the expr
source§

fn to_expr_proto(&self) -> ExprNode

Serialize the expression
source§

impl From<AggCall> for ExprImpl

source§

fn from(o: AggCall) -> ExprImpl

Converts to this type from the input type.
source§

impl From<Condition> for ExprImpl

source§

fn from(c: Condition) -> Self

Converts to this type from the input type.
source§

impl From<CorrelatedInputRef> for ExprImpl

source§

fn from(o: CorrelatedInputRef) -> ExprImpl

Converts to this type from the input type.
source§

impl From<FunctionCall> for ExprImpl

source§

fn from(o: FunctionCall) -> ExprImpl

Converts to this type from the input type.
source§

impl From<FunctionCallWithLambda> for ExprImpl

source§

fn from(o: FunctionCallWithLambda) -> ExprImpl

Converts to this type from the input type.
source§

impl From<InputRef> for ExprImpl

source§

fn from(o: InputRef) -> ExprImpl

Converts to this type from the input type.
source§

impl From<Literal> for ExprImpl

source§

fn from(o: Literal) -> ExprImpl

Converts to this type from the input type.
source§

impl From<Now> for ExprImpl

source§

fn from(o: Now) -> ExprImpl

Converts to this type from the input type.
source§

impl From<Parameter> for ExprImpl

source§

fn from(o: Parameter) -> ExprImpl

Converts to this type from the input type.
source§

impl From<Subquery> for ExprImpl

source§

fn from(o: Subquery) -> ExprImpl

Converts to this type from the input type.
source§

impl From<TableFunction> for ExprImpl

source§

fn from(o: TableFunction) -> ExprImpl

Converts to this type from the input type.
source§

impl From<UserDefinedFunction> for ExprImpl

source§

fn from(o: UserDefinedFunction) -> ExprImpl

Converts to this type from the input type.
source§

impl From<WindowFunction> for ExprImpl

source§

fn from(o: WindowFunction) -> ExprImpl

Converts to this type from the input type.
source§

impl Hash for ExprImpl

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for ExprImpl

source§

fn eq(&self, other: &ExprImpl) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for ExprImpl

source§

impl StructuralPartialEq for ExprImpl

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> DynClone for T
where T: Clone,

source§

impl<T> DynEq for T
where T: Any + Eq,

source§

fn as_any(&self) -> &(dyn Any + 'static)

source§

fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool

source§

impl<T> DynHash for T
where T: DynEq + Hash,

source§

fn as_dyn_eq(&self) -> &(dyn DynEq + 'static)

source§

fn dyn_hash(&self, state: &mut dyn Hasher)

§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> IntoResult<T> for T

§

type Err = Infallible

§

fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>

§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

§

fn lift_into(self) -> U

Performs the indexed conversion.
source§

impl<M> MetricVecRelabelExt for M

source§

fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>

source§

fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>

source§

fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>

Equivalent to RelabeledMetricVec::with_metric_level_relabel_n with metric_level set to MetricLevel::Debug and relabel_num set to 1.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows 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) -> R
where R: 'a,

Mutably borrows 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
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows 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
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows 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
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
source§

impl<T> SerTo<T> for T

§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .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
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .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
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> DevConfig for T
where T: Send + Sync + 'static + Debug,

§

impl<T> Key for T
where T: Send + Sync + 'static + Hash + Eq,

§

impl<T> Key for T
where T: Hash + Eq + Debug + Send + Sync + 'static,

source§

impl<T> LruKey for T
where T: Eq + Send + Hash,

source§

impl<T> LruValue for T
where T: Send + Sync,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> Value for T
where T: Send + Sync + 'static,