pub(crate) struct SqlGenerator<'a, R: Rng> {
tables: Vec<Table>,
rng: &'a mut R,
relation_id: u32,
bound_relations: Vec<Table>,
bound_columns: Vec<Column>,
is_mview: bool,
recursion_weight: f64,
}
Fields§
§tables: Vec<Table>
§rng: &'a mut R
§relation_id: u32
Relation ID used to generate table names and aliases
bound_relations: Vec<Table>
Relations bound in generated query. We might not read from all tables.
bound_columns: Vec<Column>
Columns bound in generated query.
May not contain all columns from Self::bound_relations
.
e.g. GROUP BY clause will constrain bound_columns
.
is_mview: bool
SqlGenerator
can be used in two execution modes:
- Generating Query Statements.
- Generating queries for CREATE MATERIALIZED VIEW. Under this mode certain restrictions and workarounds are applied for unsupported stream executors.
recursion_weight: f64
Implementations§
Source§impl<R: Rng> SqlGenerator<'_, R>
impl<R: Rng> SqlGenerator<'_, R>
Source§impl<R: Rng> SqlGenerator<'_, R>
impl<R: Rng> SqlGenerator<'_, R>
pub(crate) fn gen_explicit_cast( &mut self, ret: &DataType, context: SqlGeneratorContext, ) -> Expr
Sourcefn gen_explicit_cast_inner(
&mut self,
ret: &DataType,
context: SqlGeneratorContext,
) -> Option<Expr>
fn gen_explicit_cast_inner( &mut self, ret: &DataType, context: SqlGeneratorContext, ) -> Option<Expr>
Generate casts from a cast map.
TODO: Assign casts have to be tested via INSERT
.
Sourcepub(crate) fn gen_implicit_cast(
&mut self,
ret: &DataType,
context: SqlGeneratorContext,
) -> Expr
pub(crate) fn gen_implicit_cast( &mut self, ret: &DataType, context: SqlGeneratorContext, ) -> Expr
NOTE: This can result in ambiguous expressions. Should only be used in unambiguous context.
Source§impl<R: Rng> SqlGenerator<'_, R>
impl<R: Rng> SqlGenerator<'_, R>
Sourcepub(crate) fn gen_expr(
&mut self,
typ: &DataType,
context: SqlGeneratorContext,
) -> Expr
pub(crate) fn gen_expr( &mut self, typ: &DataType, context: SqlGeneratorContext, ) -> Expr
In generating expression, there are two execution modes:
- Can have Aggregate expressions (
can_agg
= true) We can have aggregate of all bound columns (those present in GROUP BY and otherwise). Not all GROUP BY columns need to be aggregated. - Can’t have Aggregate expressions (
can_agg
= false) Only columns present in GROUP BY can be selected.
inside_agg
indicates if we are calling gen_expr
inside an aggregate.
fn gen_data_type(&mut self) -> DataType
fn gen_data_type_inner(&mut self, depth: usize) -> DataType
fn gen_list_data_type(&mut self, depth: usize) -> DataType
fn gen_struct_data_type(&mut self, depth: usize) -> DataType
Sourcepub(crate) fn gen_arbitrary_expr(
&mut self,
context: SqlGeneratorContext,
) -> (DataType, Expr)
pub(crate) fn gen_arbitrary_expr( &mut self, context: SqlGeneratorContext, ) -> (DataType, Expr)
Generates an arbitrary expression, but biased towards datatypes present in bound columns.
fn gen_col(&mut self, typ: &DataType, context: SqlGeneratorContext) -> Expr
Sourcepub(crate) fn gen_n_exprs_with_type(
&mut self,
n: usize,
ret: &DataType,
context: SqlGeneratorContext,
) -> Vec<Expr>
pub(crate) fn gen_n_exprs_with_type( &mut self, n: usize, ret: &DataType, context: SqlGeneratorContext, ) -> Vec<Expr>
Generates n
expressions of type ret
.
fn gen_exists(&mut self, ret: &DataType, context: SqlGeneratorContext) -> Expr
Sourcepub(crate) fn gen_order_by(&mut self) -> Vec<OrderByExpr>
pub(crate) fn gen_order_by(&mut self) -> Vec<OrderByExpr>
Generate ORDER BY expressions by choosing from available bound columns.
Sourcepub(crate) fn gen_order_by_within(&mut self, exprs: &[Expr]) -> Vec<OrderByExpr>
pub(crate) fn gen_order_by_within(&mut self, exprs: &[Expr]) -> Vec<OrderByExpr>
Generate ORDER BY expressions by choosing from given expressions.
Source§impl<'a, R: Rng + 'a> SqlGenerator<'a, R>
impl<'a, R: Rng + 'a> SqlGenerator<'a, R>
pub(crate) fn generate_insert_statement( &mut self, table: &Table, row_count: usize, ) -> Statement
pub(crate) fn generate_update_statements( &mut self, tables: &[Table], inserts: &[Statement], ) -> Result<Vec<Statement>>
pub(crate) fn generate_update_statements_inner( &mut self, table: &Table, values: &[Vec<Expr>], pk_indices: &[usize], ) -> Vec<Statement>
fn row_to_update_statement( table: &Table, pk_indices: &[usize], value_indices: &[usize], row: &[Expr], ) -> Statement
fn create_selection_expr( table: &Table, selected_indices: &[usize], row: &[Expr], ) -> Expr
fn generate_delete_statements( &mut self, table: &Table, values: &[Vec<Expr>], ) -> Vec<Statement>
fn extract_insert_values(source: &Query) -> Result<&[Vec<Expr>]>
fn gen_values( &mut self, data_types: &[DataType], row_count: usize, ) -> Vec<Vec<Expr>>
fn gen_row(&mut self, data_types: &[DataType]) -> Vec<Expr>
Source§impl<R: Rng> SqlGenerator<'_, R>
impl<R: Rng> SqlGenerator<'_, R>
pub fn gen_func(&mut self, ret: &DataType, context: SqlGeneratorContext) -> Expr
Sourcefn gen_special_func(
&mut self,
ret: &DataType,
context: SqlGeneratorContext,
) -> Expr
fn gen_special_func( &mut self, ret: &DataType, context: SqlGeneratorContext, ) -> Expr
Generates functions with special properties, e.g.
CASE
, COALESCE
, CONCAT
, CONCAT_WS
, OVERLAY
.
These require custom logic for arguments.
For instance, OVERLAY
requires a positive length argument,
and CONCAT
and CONCAT_WS
require variable number of arguments.
Sourcefn gen_overlay(&mut self, context: SqlGeneratorContext) -> Expr
fn gen_overlay(&mut self, context: SqlGeneratorContext) -> Expr
We do custom generation for the OVERLAY
function call.
See: [https://github.com/risingwavelabs/risingwave/issues/10695
] for rationale.
fn gen_case(&mut self, ret: &DataType, context: SqlGeneratorContext) -> Expr
fn gen_coalesce(&mut self, ret: &DataType, context: SqlGeneratorContext) -> Expr
fn gen_concat(&mut self, context: SqlGeneratorContext) -> Expr
fn gen_concat_ws(&mut self, context: SqlGeneratorContext) -> Expr
fn gen_concat_args(&mut self, context: SqlGeneratorContext) -> Vec<Expr>
fn gen_decode(&mut self, context: SqlGeneratorContext) -> Expr
fn gen_fixed_func( &mut self, ret: &DataType, context: SqlGeneratorContext, ) -> Expr
Source§impl<R: Rng> SqlGenerator<'_, R>
Generators
impl<R: Rng> SqlGenerator<'_, R>
Generators
Sourcepub(crate) fn gen_query(&mut self) -> (Query, Vec<Column>)
pub(crate) fn gen_query(&mut self) -> (Query, Vec<Column>)
Generates query expression and returns its query schema as well.
Sourcefn gen_complex_query(&mut self) -> (Query, Vec<Column>)
fn gen_complex_query(&mut self) -> (Query, Vec<Column>)
Generates a complex query which may recurse.
e.g. through gen_with
or other generated parts of the query.
Sourcefn gen_simple_query(&mut self) -> (Query, Vec<Column>)
fn gen_simple_query(&mut self) -> (Query, Vec<Column>)
This query can still recurse, but it is “simpler” does not have “with” clause, “order by”. Which makes it more unlikely to recurse.
Sourcepub(crate) fn gen_single_item_query(&mut self) -> (Query, Column)
pub(crate) fn gen_single_item_query(&mut self) -> (Query, Column)
Generates a query with a single SELECT item. e.g. SELECT v from t; Returns the query and the SELECT column alias.
Sourcepub(crate) fn gen_local_query(&mut self) -> (Query, Vec<Column>)
pub(crate) fn gen_local_query(&mut self) -> (Query, Vec<Column>)
Generates a query with local context.
Used by WITH
, Table Subquery
in Relation
Generates a query with correlated context to ensure proper recursion.
fn gen_with(&mut self) -> (Option<With>, Vec<Table>)
fn gen_with_inner(&mut self) -> (With, Vec<Table>)
fn gen_set_expr( &mut self, with_tables: Vec<Table>, num_select_items: usize, ) -> (SetExpr, Vec<Column>)
fn gen_limit(&mut self, has_order_by: bool) -> Option<Expr>
fn gen_select_stmt( &mut self, with_tables: Vec<Table>, num_select_items: usize, ) -> (Select, Vec<Column>)
fn gen_select_list( &mut self, num_select_items: usize, ) -> (Vec<SelectItem>, Vec<Column>)
fn gen_select_item( &mut self, i: usize, context: SqlGeneratorContext, ) -> (SelectItem, Column)
fn gen_from(&mut self, with_tables: Vec<Table>) -> Vec<TableWithJoins>
fn gen_where(&mut self) -> Option<Expr>
Sourcefn gen_group_by(&mut self) -> Vec<Expr>
fn gen_group_by(&mut self) -> Vec<Expr>
GROUP BY will constrain the generated columns.
Sourcefn gen_grouping_sets(&mut self) -> Vec<Expr>
fn gen_grouping_sets(&mut self) -> Vec<Expr>
GROUPING SETS will constrain the generated columns.
fn gen_random_bound_columns(&mut self) -> Vec<Column>
fn gen_having(&mut self, have_group_by: bool) -> Option<Expr>
Source§impl<R: Rng> SqlGenerator<'_, R>
impl<R: Rng> SqlGenerator<'_, R>
Sourcepub(crate) fn gen_from_relation(&mut self) -> (TableWithJoins, Vec<Table>)
pub(crate) fn gen_from_relation(&mut self) -> (TableWithJoins, Vec<Table>)
A relation specified in the FROM clause.
fn gen_no_join(&mut self) -> (TableWithJoins, Vec<Table>)
fn gen_simple_table_factor(&mut self) -> (TableFactor, Table)
fn gen_table_factor(&mut self) -> (TableFactor, Table)
Sourcefn gen_table_factor_inner(&mut self) -> (TableFactor, Table)
fn gen_table_factor_inner(&mut self) -> (TableFactor, Table)
Generates a table factor, and provides bound columns. Generated column names should be qualified by table name.
fn gen_equi_join_columns( &mut self, left_columns: Vec<Column>, right_columns: Vec<Column>, ) -> Vec<(Column, Column)>
fn gen_bool_with_tables(&mut self, tables: Vec<Table>) -> Expr
fn gen_single_equi_join_expr( &mut self, left_columns: Vec<Column>, right_columns: Vec<Column>, ) -> Option<(Expr, Vec<(Column, Column)>)>
fn gen_non_equi_expr( &mut self, available_join_on_columns: Vec<(Column, Column)>, ) -> Expr
fn gen_more_equi_join_exprs( &mut self, available_join_on_columns: Vec<(Column, Column)>, ) -> Expr
fn gen_arbitrary_bool( &mut self, left_table: Table, right_table: Table, ) -> Option<Expr>
Sourcefn gen_join_on_expr(
&mut self,
left_columns: Vec<Column>,
left_table: Table,
right_columns: Vec<Column>,
right_table: Table,
) -> Option<Expr>
fn gen_join_on_expr( &mut self, left_columns: Vec<Column>, left_table: Table, right_columns: Vec<Column>, right_table: Table, ) -> Option<Expr>
Generates the ON
clause in t JOIN t2 ON ...
It will generate at least one equi join condition
This will reduce chance of nested loop join from being generated.
fn gen_join_constraint( &mut self, left_columns: Vec<Column>, left_table: Table, right_columns: Vec<Column>, right_table: Table, ) -> Option<JoinConstraint>
Sourcefn gen_join_operator(
&mut self,
left_columns: Vec<Column>,
left_table: Table,
right_columns: Vec<Column>,
right_table: Table,
) -> Option<JoinOperator>
fn gen_join_operator( &mut self, left_columns: Vec<Column>, left_table: Table, right_columns: Vec<Column>, right_table: Table, ) -> Option<JoinOperator>
Generates t1 JOIN t2 ON …
Sourcefn gen_simple_join_clause(&mut self) -> Option<(TableWithJoins, Vec<Table>)>
fn gen_simple_join_clause(&mut self) -> Option<(TableWithJoins, Vec<Table>)>
Generates t1 JOIN t2 ON …
Sourcefn gen_more_joins(&mut self) -> (TableWithJoins, Vec<Table>)
fn gen_more_joins(&mut self) -> (TableWithJoins, Vec<Table>)
Generates three-way join.
fn gen_table_subquery(&mut self) -> (TableFactor, Table)
Source§impl<R: Rng> SqlGenerator<'_, R>
impl<R: Rng> SqlGenerator<'_, R>
Sourcepub(super) fn gen_range_scalar(
&mut self,
typ: &DataType,
start: i64,
end: i64,
) -> Option<Expr>
pub(super) fn gen_range_scalar( &mut self, typ: &DataType, start: i64, end: i64, ) -> Option<Expr>
Generates integer scalar expression.
Bound: [start, end).
Type: DataType
.
pub(super) fn gen_simple_scalar(&mut self, typ: &DataType) -> Expr
Sourcefn gen_simple_scalar_list(&mut self, ty: &DataType, n: usize) -> Vec<Expr>
fn gen_simple_scalar_list(&mut self, ty: &DataType, n: usize) -> Vec<Expr>
Generates a list of n
simple scalar values of a specific type
.
fn gen_int(&mut self, min: i64, max: i64) -> String
fn gen_float(&mut self) -> String
fn gen_temporal_scalar(&mut self, typ: &DataType) -> String
Source§impl<R: Rng> SqlGenerator<'_, R>
impl<R: Rng> SqlGenerator<'_, R>
Sourcepub(crate) fn gen_time_window_func(&mut self) -> (TableFactor, Table)
pub(crate) fn gen_time_window_func(&mut self) -> (TableFactor, Table)
Generates time window functions.
Sourcefn gen_tumble(&mut self) -> (TableFactor, Table)
fn gen_tumble(&mut self) -> (TableFactor, Table)
Generates TUMBLE
.
TUMBLE(data: TABLE, timecol: COLUMN, size: INTERVAL, offset?: INTERVAL)
Sourcefn gen_hop(&mut self) -> (TableFactor, Table)
fn gen_hop(&mut self) -> (TableFactor, Table)
Generates HOP
.
HOP(data: TABLE, timecol: COLUMN, slide: INTERVAL, size: INTERVAL, offset?: INTERVAL)
fn gen_secs(&mut self) -> u64
fn secs_to_interval_expr(i: u64) -> Expr
fn gen_slide(&mut self) -> (u64, Expr)
Source§impl<R: Rng> SqlGenerator<'_, R>
Context utils
impl<R: Rng> SqlGenerator<'_, R>
Context utils
pub(crate) fn add_relations_to_context(&mut self, tables: Vec<Table>)
pub(crate) fn new_local_context(&mut self) -> (Vec<Column>, Vec<Table>)
pub(crate) fn restore_context( &mut self, (old_cols, old_rels): (Vec<Column>, Vec<Table>), )
pub(crate) fn clone_local_context(&mut self) -> (Vec<Column>, Vec<Table>)
Source§impl<R: Rng> SqlGenerator<'_, R>
Gen utils
impl<R: Rng> SqlGenerator<'_, R>
Gen utils
pub(crate) fn gen_table_name_with_prefix(&mut self, prefix: &str) -> String
fn gen_relation_id(&mut self) -> u32
pub(crate) fn gen_table_alias_with_prefix(&mut self, prefix: &str) -> TableAlias
Source§impl<'a, R: Rng> SqlGenerator<'a, R>
Generators
impl<'a, R: Rng> SqlGenerator<'a, R>
Generators
pub(crate) fn new(rng: &'a mut R, tables: Vec<Table>) -> Self
pub(crate) fn new_for_mview(rng: &'a mut R, tables: Vec<Table>) -> Self
pub(crate) fn gen_batch_query_stmt(&mut self) -> Statement
pub(crate) fn gen_mview_stmt(&mut self, name: &str) -> (Statement, Table)
Sourcepub(crate) fn can_recurse(&mut self) -> bool
pub(crate) fn can_recurse(&mut self) -> bool
Provide recursion bounds.
Auto Trait Implementations§
impl<'a, R> Freeze for SqlGenerator<'a, R>
impl<'a, R> RefUnwindSafe for SqlGenerator<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for SqlGenerator<'a, R>where
R: Send,
impl<'a, R> Sync for SqlGenerator<'a, R>where
R: Sync,
impl<'a, R> Unpin for SqlGenerator<'a, R>
impl<'a, R> !UnwindSafe for SqlGenerator<'a, R>
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
§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>
, 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<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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§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>,
§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> Pointee for T
impl<T> Pointee for T
§impl<T> Scope for T
impl<T> Scope 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.