Skip to main content

Instance

Struct Instance 

Source
pub struct Instance {
Show 22 fields frontend_peer_addr: String, experimental_metric_export: bool, catalog_manager: CatalogManagerRef, pipeline_operator: Arc<PipelineOperator>, statement_executor: Arc<StatementExecutor>, query_engine: QueryEngineRef, plugins: Plugins, inserter: InserterRef, logical_batcher: Arc<OnceLock<Option<Arc<LogicalTablePendingRowsBatcher>>>>, deleter: DeleterRef, table_metadata_manager: TableMetadataManagerRef, event_recorder: EventRecorderRef, slow_query_recorder: EventRecorderRef, process_manager: ProcessManagerRef, slow_query_options: SlowQueryOptions, influxdb_default_merge_mode: InfluxdbMergeMode, trace_ingest_chunk_size: usize, trace_aux_cache: TraceAuxCache, trace_aux_limiter: Option<RequestLimiter>, otlp_resource_info: bool, suspend: Arc<AtomicBool>, otlp_metrics_table_legacy_cache: Arc<DashMap<String, DashMap<String, bool>>>,
}
Expand description

The frontend instance contains necessary components, and implements many traits, like servers::query_handler::grpc::GrpcQueryHandler, servers::query_handler::sql::SqlQueryHandler, etc.

Fields§

§frontend_peer_addr: String§experimental_metric_export: bool§catalog_manager: CatalogManagerRef§pipeline_operator: Arc<PipelineOperator>§statement_executor: Arc<StatementExecutor>§query_engine: QueryEngineRef§plugins: Plugins§inserter: InserterRef§logical_batcher: Arc<OnceLock<Option<Arc<LogicalTablePendingRowsBatcher>>>>§deleter: DeleterRef§table_metadata_manager: TableMetadataManagerRef§event_recorder: EventRecorderRef§slow_query_recorder: EventRecorderRef§process_manager: ProcessManagerRef§slow_query_options: SlowQueryOptions§influxdb_default_merge_mode: InfluxdbMergeMode§trace_ingest_chunk_size: usize§trace_aux_cache: TraceAuxCache§trace_aux_limiter: Option<RequestLimiter>§otlp_resource_info: bool§suspend: Arc<AtomicBool>§otlp_metrics_table_legacy_cache: Arc<DashMap<String, DashMap<String, bool>>>

Implementations§

Source§

impl Instance

Source

fn build_dashboard_schema() -> (String, Vec<String>, Vec<ColumnDef>)

Build a schema for dashboard table. Returns the (time index, primary keys, column) definitions.

Source

fn build_dashboard_insert_column_schemas() -> Vec<PbColumnSchema>

Build a column schemas for inserting a row into the dashboard table.

Source

fn dashboard_query_ctx(table_info: &TableInfo) -> QueryContextRef

Source

async fn create_dashboard_table_if_not_exists( &self, ctx: QueryContextRef, ) -> Result<TableRef>

Source

async fn insert_dashboard( &self, name: &str, definition: &str, query_ctx: QueryContextRef, ) -> Result<()>

Insert a dashboard into the dashboard table.

Source

async fn list_dashboards( &self, query_ctx: QueryContextRef, ) -> Result<Vec<DashboardDefinition>>

List all dashboards.

Source

async fn delete_dashboard( &self, name: &str, query_ctx: QueryContextRef, ) -> Result<()>

Delete a dashboard by name.

Source§

impl Instance

Source

pub(crate) fn show_metric_export_capability(&self) -> Result<Output>

Source

pub(crate) async fn copy_metric_database( &self, arg: CopyDatabaseArgument, ctx: QueryContextRef, ) -> Result<Output>

Source

async fn export_database( &self, req: CopyDatabaseRequest, names: Option<&[String]>, cancellation: &CancellationToken, ctx: QueryContextRef, ) -> Result<DatabaseExportSummary>

Source

async fn prepare_database_export( &self, req: CopyDatabaseRequest, names: Option<&[String]>, ctx: &QueryContextRef, ) -> Result<PreparedDatabaseExport>

Source§

impl Instance

Source

pub(crate) fn check_table_permission( &self, ctx: &QueryContextRef, req: PermissionReq<'_>, targets: PermissionTableTargets, ) -> Result<PermissionResp>

Source

pub(crate) fn check_row_insert_permission( &self, requests: &RowInsertRequests, ctx: &QueryContextRef, req: PermissionReq<'_>, ) -> Result<PermissionResp>

Checks every logical table targeted by normalized row inserts.

Source

fn handle_put_record_batch_stream_inner( &self, stream: PutRecordBatchRequestStream, ctx: QueryContextRef, ) -> Pin<Box<dyn Stream<Item = Result<DoPutResponse>> + Send>>

Source

async fn handle_insert_plan( &self, insert: InsertIntoPlan, ctx: QueryContextRef, ) -> Result<Output>

Source

pub async fn handle_inserts( &self, requests: InsertRequests, ctx: QueryContextRef, ) -> Result<Output>

Source

pub async fn handle_row_inserts( &self, requests: RowInsertRequests, ctx: QueryContextRef, accommodate_existing_schema: bool, is_single_value: bool, ) -> Result<Output>

Source

pub async fn handle_influx_row_inserts( &self, requests: RowInsertRequests, ctx: QueryContextRef, ) -> Result<Output>

Source

pub async fn handle_metric_row_inserts( &self, requests: RowInsertRequests, ctx: QueryContextRef, physical_table: String, ) -> Result<Output>

Source

pub async fn handle_deletes( &self, requests: DeleteRequests, ctx: QueryContextRef, ) -> Result<Output>

Source

pub async fn handle_row_deletes( &self, requests: RowDeleteRequests, ctx: QueryContextRef, ) -> Result<Output>

Source§

impl Instance

Source

pub(crate) async fn copy_packed_database( &self, arg: CopyDatabaseArgument, stmt: &Statement, ctx: QueryContextRef, ) -> Result<Output>

Source§

impl Instance

Source§

impl Instance

Source

async fn prepare_log_insert( &self, log: RowInsertRequests, ctx: QueryContextRef, ) -> ServerResult<RowInsertRequests>

Source§

impl Instance

Source

pub async fn handle_log_inserts( &self, log: RowInsertRequests, ctx: QueryContextRef, ) -> ServerResult<Output>

Source

pub async fn handle_trace_inserts( &self, rows: RowInsertRequests, ctx: QueryContextRef, ) -> ServerResult<Output>

Source§

impl Instance

Source

pub fn init_logical_batcher(self: &Arc<Self>, options: &FrontendOptions)

Initializes the shared logical batcher for enabled ingestion endpoints. Disabled endpoints leave it uninitialized so downstream routers can enable it.

Source

pub(crate) fn logical_batcher( &self, ) -> Option<&Arc<LogicalTablePendingRowsBatcher>>

Source§

impl Instance

Source

async fn execute_opentsdb_write( &self, data_points: Vec<DataPoint>, ctx: QueryContextRef, ) -> ServerResult<usize>

Source§

impl Instance

Source

pub(super) async fn ingest_trace_spans( &self, pipeline: &PipelineWay, table_name: String, groups: Vec<TraceSpanGroup>, conventions: &str, ctx: QueryContextRef, ) -> ServerResult<TraceIngestOutcome>

Ingest OTLP trace spans with chunk-level writes and span-level fallback on deterministic chunk failures.

Source

fn prepare_trace_aux_write( &self, aux_data: TraceAuxData, pipeline: &PipelineWay, table_name: &str, ctx: &QueryContextRef, metrics: Option<(&IntCounter, &IntCounter)>, ) -> ServerResult<(RowInsertRequests, Vec<TraceAuxCacheKey>)>

Source

async fn insert_trace_aux_requests( &self, requests: RowInsertRequests, keys: Vec<TraceAuxCacheKey>, pipeline: &PipelineWay, ctx: QueryContextRef, ) -> ServerResult<Output>

Source

async fn ingest_trace_chunk( &self, ingest_ctx: &TraceChunkIngestContext<'_>, chunk: Vec<TraceSpan>, ctx: QueryContextRef, ingest_state: &mut TraceIngestState, ) -> ServerResult<()>

Ingest one owned trace chunk so successful spans can be moved into the accepted set without extra cloning.

Source

async fn ingest_trace_v1_prepared_chunks( &self, ingest_ctx: &TraceChunkIngestContext<'_>, request_schema: TraceRequestSchema, chunks: Vec<TraceChunkRetry>, chunk_states: Vec<TraceChunkSchemaState>, ctx: QueryContextRef, ingest_state: &mut TraceIngestState, ) -> ServerResult<()>

Source

async fn ingest_trace_v1_chunk( &self, request_schema: &TraceRequestSchema, batch_index: usize, retry: TraceChunkRetry, schema_state: TraceChunkSchemaState, ctx: QueryContextRef, ingest_state: &mut TraceIngestState, ) -> ServerResult<()>

Source

async fn ingest_trace_v1_rows_span_by_span( &self, retry: TraceChunkRetry, ctx: QueryContextRef, ingest_state: &mut TraceIngestState, ) -> ServerResult<()>

Source

async fn insert_trace_requests( &self, requests: RowInsertRequests, pipeline: &PipelineWay, ctx: QueryContextRef, ) -> ServerResult<Output>

Reconcile and insert one trace request batch.

Source

async fn plan_trace_v1_request_schema( &self, table_name: &str, request_schema: &mut TraceRequestSchema, ctx: &QueryContextRef, ) -> ServerResult<TraceRequestSchemaPlan>

Source

async fn prepare_trace_v1_request_schema( &self, table_name: &str, request_schema: &mut TraceRequestSchema, chunks: &mut Vec<TraceChunkRetry>, chunk_states: &mut Vec<TraceChunkSchemaState>, ctx: &QueryContextRef, ) -> ServerResult<()>

Source

fn prevalidate_trace_v1_fixed_columns( chunks: &[TraceChunkRetry], chunk_states: &[TraceChunkSchemaState], ) -> ServerResult<HashMap<String, HashSet<usize>>>

Source

fn prevalidate_trace_v1_chunk_rewrites( request_schema: &TraceRequestSchema, chunks: &[TraceChunkRetry], chunk_states: &mut [TraceChunkSchemaState], ) -> ServerResult<HashMap<String, HashSet<usize>>>

Source

fn prepare_trace_v1_chunk_rewrite( request_schema: &TraceRequestSchema, batch_index: usize, request: &mut RowInsertRequest, state: &mut TraceChunkSchemaState, ) -> ServerResult<Option<String>>

Source

fn exclude_trace_v1_schema_observations( request_schema: &mut TraceRequestSchema, chunks: &mut Vec<TraceChunkRetry>, chunk_states: &mut Vec<TraceChunkSchemaState>, exclusions: &HashMap<String, HashSet<usize>>, ) -> ServerResult<()>

Source

async fn apply_trace_v1_pre_alter( &self, ctx: &QueryContextRef, table_name: &str, pre_alter: TraceTablePreAlter, ) -> ServerResult<()>

Source

fn classify_trace_prewrite_failure( status: StatusCode, retryable: bool, ) -> ChunkFailureReaction

Source

fn add_trace_write_cost(outcome: &mut TraceIngestOutcome, cost: usize)

Source

fn trace_failure_cause(err: &Error) -> (String, String)

Returns the full cause of a pre-write failure and its display form.

output_msg masks internal errors and unwraps the root cause. Dedup must key on the full text: two causes can agree on a truncated prefix and differ exactly where the actionable detail is.

Source

fn push_trace_failure_message( messages: &mut TraceFailureMessages, label: &'static str, key: &str, message: String, )

Records one failure, merging repeats of (label, key) into a count.

Source

fn finish_trace_failure_message( accepted_spans: usize, rejected_spans: usize, messages: TraceFailureMessages, ) -> Option<String>

Source

async fn alter_trace_table_columns_to_float64( &self, ctx: &QueryContextRef, table_name: &str, column_names: &[String], ) -> ServerResult<()>

Widen existing trace table columns to Float64 before request rewrite.

Source

async fn reconcile_trace_column_types( &self, requests: &mut RowInsertRequests, ctx: &QueryContextRef, ) -> ServerResult<()>

Coerce request column types and values to match the existing table schema for compatible type pairs. Existing table schema wins when present; otherwise the full request batch decides a stable target type.

Source§

impl Instance

Source

pub async fn handle_otlp_metric_row_inserts( &self, requests: RowInsertRequests, ctx: QueryContextRef, metric_ctx: &OtlpMetricCtx, ) -> ServerResult<Output>

Inserts converted OTLP metrics through the eligible batching or ordinary write path. The caller must check table permissions and admit the complete request first.

Source§

impl Instance

Source

async fn handle_remote_query( &self, ctx: &QueryContextRef, catalog_name: &str, schema_name: &str, table_name: &str, query: &Query, ) -> Result<RemoteQueryOutput>

Source

async fn handle_remote_queries( &self, ctx: QueryContextRef, queries: &[Query], query_targets: &[PermissionTableTarget], ) -> ServerResult<Vec<RemoteQueryOutput>>

Source§

impl Instance

Source

async fn prepare_prom_store_write( &self, request: RowInsertRequests, ctx: QueryContextRef, ) -> ServerResult<(RowInsertRequests, QueryContextRef)>

Source

async fn execute_prom_store_write( &self, request: RowInsertRequests, ctx: QueryContextRef, with_metric_engine: bool, ) -> ServerResult<Output>

Source§

impl Instance

Source

async fn create_metric_physical_table_if_missing( &self, catalog: &str, schema: &str, physical_table: &str, ctx: QueryContextRef, ) -> ServerResult<()>

Source§

impl Instance

Source

pub(crate) async fn handle_query_metric_names( &self, matchers: Vec<Matcher>, schema: &str, ctx: &QueryContextRef, ) -> Result<Vec<String>>

Handles metric names query request, returns the names.

Source

pub(crate) async fn handle_query_metric_names_by_labels( &self, matchers: Vec<Matcher>, schema: &str, start: SystemTime, end: SystemTime, ctx: &QueryContextRef, ) -> Result<Vec<String>>

Handles a metric names query constrained by matchers on ordinary labels.

Instance::handle_query_metric_names answers from table metadata, which cannot resolve a label matcher: whether a metric carries pod="abc" is a property of its data. The metric engine multiplexes the logical tables of one physical table into a region holding the union of their label columns alongside __table_id, so a single distinct scan per physical table resolves the matchers for all of its logical tables at once.

Only metric engine tables are covered. Tables on other engines share no column space to scan, and a scan per table does not scale to the table counts this API is expected to answer over.

Source

async fn physical_metric_tables( &self, catalog: &str, schema: &str, ctx: &QueryContextRef, ) -> Result<Vec<TableRef>>

Returns the metric engine physical tables of a schema.

Their data regions carry the union of their logical tables’ label columns, so scanning these covers every metric of the schema.

Source

async fn scan_distinct_column( &self, table: TableRef, matchers: Vec<Matcher>, column: String, start: SystemTime, end: SystemTime, ctx: &QueryContextRef, ) -> Result<Vec<RecordBatch>>

Scans table for the distinct values of column that match matchers within the time range.

Callers look the table up and decode the batches; the plan between is the same whether the projected column is a label or __table_id.

Source

async fn scan_matching_table_ids( &self, physical: TableRef, matchers: &[Matcher], start: SystemTime, end: SystemTime, ctx: &QueryContextRef, ) -> Result<Vec<TableId>>

Returns the __table_ids of physical carrying a row that matches every matcher within the time range.

Source

pub(crate) async fn handle_query_label_values( &self, target: PermissionTableTarget, label_name: String, matchers: Vec<Matcher>, start: SystemTime, end: SystemTime, ctx: &QueryContextRef, ) -> Result<Vec<String>>

Handles label values query request, returns the values.

Source§

impl Instance

Source

pub fn frontend_peer_addr(&self) -> &str

Source

pub fn catalog_manager(&self) -> &CatalogManagerRef

Source

pub fn query_engine(&self) -> &QueryEngineRef

Source

pub fn plugins(&self) -> &Plugins

Source

fn check_permission( &self, ctx: &QueryContextRef, req: PermissionReq<'_>, ) -> Result<()>

Source

pub fn statement_executor(&self) -> &StatementExecutorRef

Source

pub fn table_metadata_manager(&self) -> &TableMetadataManagerRef

Source

pub fn inserter(&self) -> &InserterRef

Source

pub fn process_manager(&self) -> &ProcessManagerRef

Source

pub fn event_recorder(&self) -> EventRecorderRef

Returns the event recorder configured for this frontend instance.

Source

pub fn node_manager(&self) -> &NodeManagerRef

Source

pub fn partition_manager(&self) -> &PartitionRuleManagerRef

Source

pub fn table_flownode_set_cache(&self) -> &TableFlownodeSetCacheRef

Source

pub fn cache_invalidator(&self) -> &CacheInvalidatorRef

Source

pub fn procedure_executor(&self) -> &ProcedureExecutorRef

Source

pub fn suspend_state(&self) -> Arc<AtomicBool> ⓘ

Source

pub(crate) fn is_suspended(&self) -> bool

Source§

impl Instance

Source

fn statement_slow_query_timer( &self, stmt: &Statement, schema_name: String, ) -> Option<SlowQueryTimer>

Source

async fn query_statement( &self, stmt: Statement, query_ctx: QueryContextRef, ) -> Result<Output>

Source

async fn exec_statement_with_timeout( &self, stmt: Statement, query_ctx: QueryContextRef, query_interceptor: Option<&SqlQueryInterceptorRef<Error>>, timeout_recorder: Option<SlowQueryRecorder>, ) -> Result<Output>

Source

async fn exec_statement( &self, stmt: Statement, query_ctx: QueryContextRef, query_interceptor: Option<&SqlQueryInterceptorRef<Error>>, ) -> Result<Output>

Source

async fn plan_and_exec_sql( &self, stmt: Statement, query_ctx: &QueryContextRef, query_interceptor: Option<&SqlQueryInterceptorRef<Error>>, ) -> Result<Output>

Source

async fn plan_and_exec_tql( &self, query_ctx: &QueryContextRef, query_interceptor: Option<&SqlQueryInterceptorRef<Error>>, tql: Tql, ) -> Result<Output>

Source

async fn check_otlp_legacy( &self, names: &[String], ctx: &QueryContextRef, ) -> Result<bool>

Source

fn cache_otlp_legacy( &self, names: &[String], ctx: &QueryContextRef, is_legacy: bool, ) -> Result<()>

Source§

impl Instance

Source

async fn check_sql_permission( &self, stmt: &Statement, query_ctx: &QueryContextRef, ) -> Result<()>

Source

async fn do_analyze_stream_query_inner( &self, query: &str, query_ctx: QueryContextRef, ) -> Result<Output>

Source

async fn batch_create_logical_tables( &self, query: &str, query_ctx: QueryContextRef, ) -> Result<Vec<Output>>

Source

async fn do_query_inner( &self, query: &str, query_ctx: QueryContextRef, ) -> Vec<Result<Output>> ⓘ

Source

async fn exec_plan( &self, plan: LogicalPlan, query_ctx: QueryContextRef, ) -> Result<Output>

Source

async fn exec_plan_with_timeout( &self, plan: LogicalPlan, query_ctx: QueryContextRef, timeout_recorder: Option<SlowQueryRecorder>, ) -> Result<Output>

Source

async fn do_exec_plan_inner( &self, plan: LogicalPlan, stmt: Option<Statement>, query_ctx: QueryContextRef, ) -> Result<Output>

Source

async fn do_promql_query_inner( &self, query: &PromQuery, query_ctx: QueryContextRef, ) -> Vec<Result<Output>> ⓘ

Source

fn show_statement_dataframe<'a>( &'a self, stmt: &'a Statement, query_ctx: &'a QueryContextRef, ) -> Pin<Box<dyn Future<Output = Option<Result<DataFrame>>> + Send + 'a>>

Builds the [DataFrame] for an information-schema-backed SHOW statement; None for other statements. The future is boxed to keep do_describe_inner’s state machine small.

Source

async fn do_describe_inner( &self, stmt: Statement, query_ctx: QueryContextRef, ) -> Result<Option<DescribeResult>>

Source

async fn is_valid_schema_inner( &self, catalog: &str, schema: &str, ) -> Result<bool>

Source§

impl Instance

Trait Implementations§

Source§

impl Clone for Instance

Source§

fn clone(&self) -> Instance

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl DashboardHandler for Instance

Source§

fn save<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, definition: &'life2 str, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn list<'life0, 'async_trait>( &'life0 self, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Vec<DashboardDefinition>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl GrpcQueryHandler for Instance

Source§

fn do_query<'life0, 'async_trait>( &'life0 self, request: Request, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn handle_put_record_batch_stream( &self, stream: PutRecordBatchRequestStream, ctx: QueryContextRef, ) -> Pin<Box<dyn Stream<Item = Result<DoPutResponse>> + Send>>

Source§

impl InfluxdbLineProtocolHandler for Instance

Source§

fn exec<'life0, 'async_trait>( &'life0 self, request: InfluxdbRequest, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl JaegerQueryHandler for Instance

Source§

fn get_services<'life0, 'async_trait>( &'life0 self, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get trace services. It’s used for /api/services API.
Source§

fn get_operations<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: QueryContextRef, service_name: &'life1 str, span_kind: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get Jaeger operations. It’s used for /api/operations and /api/services/{service_name}/operations API.
Source§

fn get_trace<'life0, 'life1, 'async_trait>( &'life0 self, ctx: QueryContextRef, trace_id: &'life1 str, start_time: Option<i64>, end_time: Option<i64>, limit: Option<usize>, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieves a trace by its unique identifier. Read more
Source§

fn find_traces<'life0, 'async_trait>( &'life0 self, ctx: QueryContextRef, query_params: QueryTraceParams, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Find traces by query params. It’s used for /api/traces API.
Source§

impl LogQueryHandler for Instance

Source§

fn query<'life0, 'async_trait>( &'life0 self, request: LogQuery, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Execute a log query.
Source§

fn catalog_manager( &self, _ctx: &QueryContext, ) -> ServerResult<&dyn CatalogManager>

Get catalog manager.
Source§

impl OpenTelemetryProtocolHandler for Instance

Source§

fn metrics<'life0, 'async_trait>( &'life0 self, request: ExportMetricsServiceRequest, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<MetricsIngestOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handling opentelemetry metrics request
Source§

fn traces<'life0, 'async_trait>( &'life0 self, _pipeline_handler: PipelineHandlerRef, request: ExportTraceServiceRequest, pipeline: PipelineWay, _pipeline_params: GreptimePipelineParams, table_name: String, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<TraceIngestOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handling opentelemetry traces request
Source§

fn logs<'life0, 'async_trait>( &'life0 self, pipeline_handler: PipelineHandlerRef, request: ExportLogsServiceRequest, pipeline: PipelineWay, pipeline_params: GreptimePipelineParams, table_name: String, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<Vec<Output>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl OpentsdbProtocolHandler for Instance

Source§

fn preflight<'life0, 'life1, 'async_trait>( &'life0 self, data_points: &'life1 [DataPoint], ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Checks all points in one external request before per-point debug execution.
Source§

fn exec<'life0, 'async_trait>( &'life0 self, data_points: Vec<DataPoint>, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn exec_batch<'life0, 'async_trait>( &'life0 self, data_points: Vec<DataPoint>, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Executes an ordinary HTTP put with optional batching. Debug callers retain Self::exec; the frontend clears HTTP batching selection there so diagnostic requests preserve direct, per-point error attribution.
Source§

impl PendingRowsSchemaAlterer for Instance

Source§

fn create_tables_if_missing_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, catalog: &'life1 str, schema: &'life2 str, tables: &'life3 [(&'life4 str, &'life5 [ColumnSchema])], with_metric_engine: bool, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Batch-create multiple logical tables that are missing. Each entry is (table_name, request_schema).
Source§

fn add_missing_prom_tag_columns_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, catalog: &'life1 str, schema: &'life2 str, tables: &'life3 [(&'life4 str, &'life5 [String])], ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Batch-alter multiple logical tables to add missing tag columns. Each entry is (table_name, missing_column_names).
Source§

impl PipelineHandler for Instance

Source§

fn insert<'life0, 'async_trait>( &'life0 self, log: RowInsertRequests, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn insert_all<'life0, 'async_trait>( &'life0 self, inputs: Vec<(QueryContextRef, RowInsertRequests)>, ) -> Pin<Box<dyn Future<Output = ServerResult<Vec<ServerResult<Output>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Checks every batch before inserting any of them.
Source§

fn check_pipeline_query_permission( &self, query_ctx: &QueryContextRef, ) -> ServerResult<()>

Source§

fn get_pipeline<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, version: PipelineVersion, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<Arc<Pipeline>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Loads a compiled pipeline for execution. Read more
Source§

fn insert_pipeline<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, content_type: &'life2 str, pipeline: &'life3 str, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<PipelineInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn delete_pipeline<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, version: PipelineVersion, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<Option<()>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_table<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, table: &'life1 str, query_ctx: &'life2 QueryContext, ) -> Pin<Box<dyn Future<Output = Result<Option<Arc<Table>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn build_pipeline(&self, pipeline: &str) -> ServerResult<Pipeline>

Source§

fn get_pipeline_str<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, version: PipelineVersion, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<(String, TimestampNanosecond)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get a original pipeline by name.
Source§

impl PromStoreProtocolHandler for Instance

Source§

fn pre_write<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 RowInsertRequests, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Runs pre-write checks/hooks for prometheus remote write requests.
Source§

fn write_prepared<'life0, 'async_trait>( &'life0 self, request: RowInsertRequests, ctx: QueryContextRef, with_metric_engine: bool, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Writes one batch after Self::pre_write has succeeded for the entire request.
Source§

fn write<'life0, 'async_trait>( &'life0 self, request: RowInsertRequests, ctx: QueryContextRef, with_metric_engine: bool, ) -> Pin<Box<dyn Future<Output = ServerResult<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handling prometheus remote write requests
Source§

fn write_all<'life0, 'async_trait>( &'life0 self, requests: Vec<(QueryContextRef, RowInsertRequests)>, with_metric_engine: bool, ) -> Pin<Box<dyn Future<Output = ServerResult<Vec<ServerResult<Output>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Checks every batch before writing any of them.
Source§

fn read<'life0, 'async_trait>( &'life0 self, request: ReadRequest, ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = ServerResult<PromStoreResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handling prometheus remote read requests
Source§

impl PrometheusHandler for Instance

Source§

fn do_query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 PromQuery, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn do_query_parsed<'life0, 'async_trait>( &'life0 self, query: ParsedPromQuery, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Executes a query whose statement has already been parsed.
Source§

fn check_query_permission<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, queries: &'life1 [PromQuery], query_ctx: &'life2 QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Checks access to every table referenced by a batch of PromQL queries. Read more
Source§

fn check_query_permission_parsed<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, queries: &'life1 [ParsedPromQuery], query_ctx: &'life2 QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Checks access without parsing the queries again.
Source§

fn check_query_target_permission<'life0, 'life1, 'async_trait>( &'life0 self, targets: PermissionTableTargets, query_ctx: &'life1 QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Checks access to targets resolved by Prometheus metadata APIs.
Source§

fn filter_metadata_metric_names<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, metric_names: Vec<String>, schema: &'life1 str, query_ctx: &'life2 QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Removes inaccessible metric names from logical-table metadata enumeration results.
Source§

fn query_metric_names<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, matchers: Vec<Matcher>, schema: &'life1 str, ctx: &'life2 QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Query metric table names by the __name__ matchers.
Source§

fn query_metric_names_by_labels<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, matchers: Vec<Matcher>, schema: &'life1 str, start: SystemTime, end: SystemTime, ctx: &'life2 QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Query metric table names that carry data matching matchers in the time range. matchers must hold only ordinary label matchers: __name__ names a table and the database and field matchers name no column, so the caller resolves all three before calling. Read more
Source§

fn query_label_values<'life0, 'life1, 'async_trait>( &'life0 self, metric: String, label_name: String, matchers: Vec<Matcher>, start: SystemTime, end: SystemTime, ctx: &'life1 QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn catalog_manager(&self) -> CatalogManagerRef

Source§

impl SqlQueryHandler for Instance

Source§

fn supports_metric_batch_ddl(&self) -> bool

Whether this handler implements the bounded logical-table DDL operation.
Source§

fn create_logical_tables<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Vec<Output>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Validates and authorizes the whole batch before submitting one procedure.
Source§

fn do_query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Vec<Result<Output>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn do_analyze_stream_query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Executes an HTTP analyze-stream query. Read more
Source§

fn do_exec_plan<'life0, 'async_trait>( &'life0 self, plan: LogicalPlan, stmt: Option<Statement>, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn do_promql_query<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 PromQuery, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Vec<Result<Output>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn do_describe<'life0, 'async_trait>( &'life0 self, stmt: Statement, query_ctx: QueryContextRef, ) -> Pin<Box<dyn Future<Output = Result<Option<DescribeResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn is_valid_schema<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, catalog: &'life1 str, schema: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

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
§

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

§

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

§

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

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

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

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
§

impl<T> CloneAny for T
where T: Any + Clone,

§

impl<T> CloneAnySend for T
where T: Any + Send + Clone,

§

impl<T> CloneAnySendSync for T
where T: Any + Send + Sync + Clone,

§

impl<T> CloneAnySync for T
where T: Any + Sync + Clone,

Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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>

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

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

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

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

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

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

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

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

§

impl<T> ErasedDestructor for T
where T: 'static,

§

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> Fruit for T
where T: Send + Downcast,

§

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

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

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

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

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

§

fn lift_into(self) -> U

Performs the indexed conversion.
§

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

§

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

§

impl<Source, Target> OctetsInto<Target> for Source
where Target: OctetsFrom<Source>,

§

type Error = <Target as OctetsFrom<Source>>::Error

§

fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>

Performs the conversion.
§

fn octets_into(self) -> Target
where Self::Error: Into<Infallible>,

Performs an infallible conversion.
§

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
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. 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
§

impl<T> ServiceExt for T

§

fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>
where Self: Sized,

Propagate a header from the request to the response. Read more
§

fn add_extension<T>(self, value: T) -> AddExtension<Self, T>
where Self: Sized,

Add some shareable value to request extensions. Read more
§

fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>
where Self: Sized,

Apply a transformation to the request body. Read more
§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
§

fn compression(self) -> Compression<Self>
where Self: Sized,

Compresses response bodies. Read more
§

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Decompress response bodies. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
§

fn sensitive_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>
where Self: Sized,

Mark headers as sensitive on both requests and responses. Read more
§

fn sensitive_request_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<Self>
where Self: Sized,

Mark headers as sensitive on requests. Read more
§

fn sensitive_response_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveResponseHeaders<Self>
where Self: Sized,

Mark headers as sensitive on responses. Read more
§

fn override_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Insert a header into the request. Read more
§

fn append_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Append a header into the request. Read more
§

fn insert_request_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Insert a header into the request, if the header is not already present. Read more
§

fn override_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Insert a header into the response. Read more
§

fn append_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Append a header into the response. Read more
§

fn insert_response_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Insert a header into the response, if the header is not already present. Read more
§

fn set_request_id<M>( self, header_name: HeaderName, make_request_id: M, ) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension. Read more
§

fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Add request id header and extension, using x-request-id as the header name. Read more
§

fn propagate_request_id( self, header_name: HeaderName, ) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses. Read more
§

fn propagate_x_request_id(self) -> PropagateRequestId<Self>
where Self: Sized,

Propgate request ids from requests to responses, using x-request-id as the header name. Read more
§

fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>
where Self: Sized,

Catch panics and convert them into 500 Internal Server responses. Read more
§

fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>
where Self: Sized,

Intercept requests with over-sized payloads and convert them into 413 Payload Too Large responses. Read more
§

fn trim_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Remove trailing slashes from paths. Read more
§

fn append_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Append trailing slash to paths. Read more
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
§

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
§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

§

fn is_within(&self, b: &G2) -> bool