risingwave_meta::controller::catalog

Struct CatalogController

source
pub struct CatalogController {
    pub(crate) env: MetaSrvEnv,
    pub(crate) inner: RwLock<CatalogControllerInner>,
}
Expand description

CatalogController is the controller for catalog related operations, including database, schema, table, view, etc.

Fields§

§env: MetaSrvEnv§inner: RwLock<CatalogControllerInner>

Implementations§

source§

impl CatalogController

source

pub async fn new(env: MetaSrvEnv) -> MetaResult<Self>

source

async fn init(&self) -> MetaResult<()>

source

async fn table_catalog_cdc_table_id_update(&self) -> MetaResult<()>

Fill in the cdc_table_id field for Table with empty cdc_table_id and parent Source job. NOTES: We assume Table with a parent Source job is a CDC table

source

pub async fn get_inner_read_guard( &self, ) -> RwLockReadGuard<'_, CatalogControllerInner>

Used in NotificationService::subscribe. Need to pay attention to the order of acquiring locks to prevent deadlock problems.

source

pub async fn get_inner_write_guard( &self, ) -> RwLockWriteGuard<'_, CatalogControllerInner>

source§

impl CatalogController

source

pub(crate) async fn notify_frontend( &self, operation: NotificationOperation, info: NotificationInfo, ) -> NotificationVersion

source

pub(crate) async fn notify_frontend_relation_info( &self, operation: NotificationOperation, relation_info: PbRelationInfo, ) -> NotificationVersion

source

pub(crate) async fn current_notification_version(&self) -> NotificationVersion

source§

impl CatalogController

source

pub(crate) async fn create_object( txn: &DatabaseTransaction, obj_type: ObjectType, owner_id: UserId, database_id: Option<DatabaseId>, schema_id: Option<SchemaId>, ) -> MetaResult<Model>

source

pub async fn create_database( &self, db: PbDatabase, ) -> MetaResult<NotificationVersion>

source

pub async fn drop_database( &self, database_id: DatabaseId, ) -> MetaResult<(ReleaseContext, NotificationVersion)>

source

pub async fn get_object_database_id( &self, object_id: ObjectId, ) -> MetaResult<DatabaseId>

source

pub async fn create_schema( &self, schema: PbSchema, ) -> MetaResult<NotificationVersion>

source

pub async fn drop_schema( &self, schema_id: SchemaId, drop_mode: DropMode, ) -> MetaResult<NotificationVersion>

source

pub async fn create_subscription_catalog( &self, pb_subscription: &mut PbSubscription, ) -> MetaResult<()>

source

pub async fn finish_create_subscription_catalog( &self, subscription_id: u32, ) -> MetaResult<()>

source

pub async fn notify_create_subscription( &self, subscription_id: u32, ) -> MetaResult<NotificationVersion>

source

pub async fn clean_dirty_subscription(&self) -> MetaResult<()>

source

pub async fn list_background_creating_mviews( &self, include_initial: bool, ) -> MetaResult<Vec<Model>>

source

pub async fn list_all_object_dependencies( &self, ) -> MetaResult<Vec<PbObjectDependencies>>

source

pub async fn list_created_object_dependencies( &self, ) -> MetaResult<Vec<PbObjectDependencies>>

source

async fn list_object_dependencies( &self, include_creating: bool, ) -> MetaResult<Vec<PbObjectDependencies>>

source

pub async fn has_any_streaming_jobs(&self) -> MetaResult<bool>

source

pub async fn clean_dirty_creating_jobs(&self) -> MetaResult<Vec<SourceId>>

clean_dirty_creating_jobs cleans up creating jobs that are creating in Foreground mode or in Initial status.

source

async fn log_cleaned_dirty_jobs( &self, dirty_objs: &[PartialObject], txn: &DatabaseTransaction, ) -> MetaResult<()>

source

async fn clean_dirty_sink_downstreams( txn: &DatabaseTransaction, ) -> MetaResult<bool>

source

pub async fn create_source( &self, pb_source: PbSource, ) -> MetaResult<(SourceId, NotificationVersion)>

source

pub async fn create_function( &self, pb_function: PbFunction, ) -> MetaResult<NotificationVersion>

source

pub async fn drop_function( &self, function_id: FunctionId, ) -> MetaResult<NotificationVersion>

source

pub async fn create_secret( &self, pb_secret: PbSecret, secret_plain_payload: Vec<u8>, ) -> MetaResult<NotificationVersion>

source

pub async fn get_secret_by_id( &self, secret_id: SecretId, ) -> MetaResult<PbSecret>

source

pub async fn drop_secret( &self, secret_id: SecretId, ) -> MetaResult<NotificationVersion>

source

pub async fn create_connection( &self, pb_connection: PbConnection, ) -> MetaResult<NotificationVersion>

source

pub async fn get_connection_by_id( &self, connection_id: ConnectionId, ) -> MetaResult<PbConnection>

source

pub async fn drop_connection( &self, connection_id: ConnectionId, ) -> MetaResult<(NotificationVersion, PbConnection)>

source

pub async fn create_view( &self, pb_view: PbView, ) -> MetaResult<NotificationVersion>

source

pub async fn alter_owner( &self, object_type: ObjectType, object_id: ObjectId, new_owner: UserId, ) -> MetaResult<NotificationVersion>

source

pub async fn alter_schema( &self, object_type: ObjectType, object_id: ObjectId, new_schema: SchemaId, ) -> MetaResult<NotificationVersion>

source

pub async fn comment_on( &self, comment: PbComment, ) -> MetaResult<NotificationVersion>

source

pub async fn drop_relation( &self, object_type: ObjectType, object_id: ObjectId, drop_mode: DropMode, ) -> MetaResult<(ReleaseContext, NotificationVersion)>

source

async fn alter_database_name( &self, database_id: DatabaseId, name: &str, ) -> MetaResult<NotificationVersion>

source

async fn alter_schema_name( &self, schema_id: SchemaId, name: &str, ) -> MetaResult<NotificationVersion>

source

pub async fn alter_name( &self, object_type: ObjectType, object_id: ObjectId, object_name: &str, ) -> MetaResult<NotificationVersion>

source

pub async fn alter_swap_rename( &self, object_type: ObjectType, object_id: ObjectId, dst_object_id: ObjectId, ) -> MetaResult<NotificationVersion>

source

pub async fn list_stream_job_desc_for_telemetry( &self, ) -> MetaResult<Vec<MetaTelemetryJobDesc>>

source

pub async fn alter_source( &self, pb_source: PbSource, ) -> MetaResult<NotificationVersion>

source

pub async fn list_databases(&self) -> MetaResult<Vec<PbDatabase>>

source

pub async fn list_schemas(&self) -> MetaResult<Vec<PbSchema>>

source

pub async fn list_all_state_tables(&self) -> MetaResult<Vec<PbTable>>

source

pub async fn list_all_state_table_ids(&self) -> MetaResult<Vec<TableId>>

source

pub async fn list_readonly_table_ids( &self, schema_id: SchemaId, ) -> MetaResult<Vec<TableId>>

source

pub async fn list_dml_table_ids( &self, schema_id: SchemaId, ) -> MetaResult<Vec<TableId>>

source

pub async fn list_view_ids( &self, schema_id: SchemaId, ) -> MetaResult<Vec<ViewId>>

source

pub async fn list_tables_by_type( &self, table_type: TableType, ) -> MetaResult<Vec<PbTable>>

source

pub async fn list_sources(&self) -> MetaResult<Vec<PbSource>>

source

pub async fn list_source_id_with_shared_types( &self, ) -> MetaResult<HashMap<SourceId, bool>>

source

pub async fn list_source_ids( &self, schema_id: SchemaId, ) -> MetaResult<Vec<SourceId>>

source

pub async fn list_sinks(&self) -> MetaResult<Vec<PbSink>>

source

pub async fn list_subscriptions(&self) -> MetaResult<Vec<PbSubscription>>

source

pub async fn list_views(&self) -> MetaResult<Vec<PbView>>

source

pub async fn list_users(&self) -> MetaResult<Vec<PbUserInfo>>

source

pub async fn get_table_by_name( &self, database_name: &str, table_name: &str, ) -> MetaResult<Option<PbTable>>

source

pub async fn get_table_by_ids( &self, table_ids: Vec<TableId>, ) -> MetaResult<Vec<PbTable>>

source

pub async fn get_sink_by_ids( &self, sink_ids: Vec<SinkId>, ) -> MetaResult<Vec<PbSink>>

source

pub async fn get_subscription_by_id( &self, subscription_id: SubscriptionId, ) -> MetaResult<PbSubscription>

source

pub async fn get_mv_depended_subscriptions( &self, ) -> MetaResult<HashMap<DatabaseId, HashMap<TableId, HashMap<SubscriptionId, u64>>>>

source

pub async fn find_creating_streaming_job_ids( &self, infos: Vec<PbCreatingJobInfo>, ) -> MetaResult<Vec<ObjectId>>

source

pub async fn list_connections(&self) -> MetaResult<Vec<PbConnection>>

source

pub async fn get_all_table_options( &self, ) -> MetaResult<HashMap<TableId, TableOption>>

source

pub async fn get_all_created_streaming_parallelisms( &self, ) -> MetaResult<HashMap<ObjectId, StreamingParallelism>>

source

pub async fn get_table_name_type_mapping( &self, ) -> MetaResult<HashMap<TableId, (String, String)>>

source

pub async fn get_table_by_cdc_table_id( &self, cdc_table_id: &String, ) -> MetaResult<Vec<PbTable>>

source

pub async fn get_created_table_ids(&self) -> MetaResult<Vec<TableId>>

source

pub async fn get_versioned_table_schemas( &self, ) -> MetaResult<HashMap<TableId, Vec<i32>>>

Returns column ids of versioned tables. Being versioned implies using ColumnAwareSerde.

source§

impl CatalogController

source

pub(crate) async fn notify_fragment_mapping( &self, operation: NotificationOperation, fragment_mappings: Vec<PbFragmentWorkerSlotMapping>, )

source

pub fn extract_fragment_and_actors_from_table_fragments( _: PbTableFragments, ) -> MetaResult<Vec<(Model, Vec<Model>, HashMap<ActorId, Vec<Model>>)>>

source

pub fn extract_fragment_and_actors( job_id: ObjectId, pb_fragment: PbFragment, pb_actor_status: &HashMap<u32, PbActorStatus>, pb_actor_splits: &HashMap<u32, PbConnectorSplits>, ) -> MetaResult<(Model, Vec<Model>, HashMap<ActorId, Vec<Model>>)>

source

pub fn compose_table_fragments( table_id: u32, state: PbState, ctx: Option<PbStreamContext>, fragments: Vec<(Model, Vec<Model>, HashMap<ActorId, Vec<Model>>)>, parallelism: StreamingParallelism, max_parallelism: usize, ) -> MetaResult<PbTableFragments>

source

pub(crate) fn compose_fragment( fragment: Model, actors: Vec<Model>, actor_dispatcher: HashMap<ActorId, Vec<Model>>, ) -> MetaResult<(PbFragment, HashMap<u32, PbActorStatus>, HashMap<u32, PbConnectorSplits>)>

source

pub async fn running_fragment_parallelisms( &self, id_filter: Option<HashSet<FragmentId>>, ) -> MetaResult<HashMap<FragmentId, FragmentParallelismInfo>>

source

pub async fn fragment_job_mapping( &self, ) -> MetaResult<HashMap<FragmentId, ObjectId>>

source

pub async fn get_upstream_job_counts( &self, job_ids: Vec<ObjectId>, ) -> MetaResult<HashMap<ObjectId, HashMap<ObjectId, usize>>>

Gets the counts for each upstream relation that each stream job indicated by table_ids depends on. For example in the following query:

CREATE MATERIALIZED VIEW m1 AS
  SELECT * FROM t1 JOIN t2 ON t1.a = t2.a JOIN t3 ON t2.b = t3.b

We have t1 occurring once, and t2 occurring once.

source

pub async fn get_fragment_job_id( &self, fragment_ids: Vec<FragmentId>, ) -> MetaResult<Vec<ObjectId>>

source

pub async fn list_fragment_database_ids( &self, select_fragment_ids: Option<Vec<FragmentId>>, ) -> MetaResult<Vec<(FragmentId, DatabaseId)>>

source

pub async fn get_job_fragments_by_id( &self, job_id: ObjectId, ) -> MetaResult<PbTableFragments>

source

pub async fn list_streaming_job_infos( &self, ) -> MetaResult<Vec<StreamingJobInfo>>

source

pub async fn get_max_parallelism_by_id( &self, job_id: ObjectId, ) -> MetaResult<usize>

source

pub async fn get_job_actor_mapping( &self, job_ids: Vec<ObjectId>, ) -> MetaResult<HashMap<ObjectId, Vec<ActorId>>>

Get all actor ids in the target streaming jobs.

source

pub async fn get_job_internal_table_ids( &self, ) -> Option<Vec<(ObjectId, Vec<TableId>)>>

Try to get internal table ids of each streaming job, used by metrics collection.

source

pub async fn has_any_running_jobs(&self) -> MetaResult<bool>

source

pub async fn worker_actor_count(&self) -> MetaResult<HashMap<WorkerId, usize>>

source

pub async fn table_fragments( &self, ) -> MetaResult<BTreeMap<ObjectId, PbTableFragments>>

source

pub async fn list_actor_locations( &self, ) -> MetaResult<Vec<PartialActorLocation>>

source

pub async fn list_source_actors(&self) -> MetaResult<Vec<(ActorId, FragmentId)>>

source

pub async fn list_fragment_descs(&self) -> MetaResult<Vec<FragmentDesc>>

source

pub async fn list_sink_actor_mapping( &self, ) -> MetaResult<HashMap<SinkId, (String, Vec<ActorId>)>>

source

pub async fn list_fragment_state_tables( &self, ) -> MetaResult<Vec<PartialFragmentStateTables>>

source

pub async fn load_all_actors( &self, ) -> MetaResult<HashMap<DatabaseId, HashMap<TableId, HashMap<FragmentId, InflightFragmentInfo>>>>

Used in crate::barrier::GlobalBarrierManager, load all running actor that need to be sent or collected

source

pub async fn migrate_actors( &self, plan: HashMap<WorkerSlotId, WorkerSlotId>, ) -> MetaResult<()>

source

pub async fn all_inuse_worker_slots(&self) -> MetaResult<HashSet<WorkerSlotId>>

source

pub async fn all_node_actors( &self, include_inactive: bool, ) -> MetaResult<HashMap<WorkerId, Vec<PbStreamActor>>>

source

pub async fn get_worker_actor_ids( &self, job_ids: Vec<ObjectId>, ) -> MetaResult<BTreeMap<WorkerId, Vec<ActorId>>>

source

pub async fn update_actor_splits( &self, split_assignment: &SplitAssignment, ) -> MetaResult<()>

source

pub async fn get_running_actors_of_fragment( &self, fragment_id: FragmentId, ) -> MetaResult<Vec<ActorId>>

Get the actor ids of the fragment with fragment_id with Running status.

source

pub async fn get_running_actors_and_upstream_of_fragment( &self, fragment_id: FragmentId, ) -> MetaResult<Vec<(ActorId, ActorUpstreamActors)>>

Get the actor ids, and each actor’s upstream actor ids of the fragment with fragment_id with Running status.

source

pub async fn get_actors_by_job_ids( &self, job_ids: Vec<ObjectId>, ) -> MetaResult<Vec<ActorId>>

source

pub async fn get_upstream_root_fragments( &self, upstream_job_ids: Vec<ObjectId>, ) -> MetaResult<(HashMap<ObjectId, PbFragment>, Vec<(ActorId, WorkerId)>)>

source

pub async fn get_downstream_chain_fragments( &self, job_id: ObjectId, ) -> MetaResult<(Vec<(DispatchStrategy, PbFragment)>, Vec<(ActorId, WorkerId)>)>

Get the downstream Chain fragments of the specified table.

source

pub async fn load_source_fragment_ids( &self, ) -> MetaResult<HashMap<SourceId, BTreeSet<FragmentId>>>

source

pub async fn load_backfill_fragment_ids( &self, ) -> MetaResult<HashMap<SourceId, BTreeSet<(FragmentId, FragmentId)>>>

source

pub async fn load_actor_splits( &self, ) -> MetaResult<HashMap<ActorId, ConnectorSplits>>

source

pub async fn get_mview_fragment( &self, job_id: ObjectId, ) -> MetaResult<PbFragment>

Get the Materialize fragment of the specified table.

source

pub async fn get_actual_job_fragment_parallelism( &self, job_id: ObjectId, ) -> MetaResult<Option<usize>>

Get the actor count of Materialize or Sink fragment of the specified table.

source§

impl CatalogController

source§

impl CatalogController

source

pub async fn integrity_check(&self) -> MetaResult<()>

source§

impl CatalogController

source

pub async fn create_streaming_job_obj( txn: &DatabaseTransaction, obj_type: ObjectType, owner_id: UserId, database_id: Option<DatabaseId>, schema_id: Option<SchemaId>, create_type: PbCreateType, ctx: &StreamContext, streaming_parallelism: StreamingParallelism, max_parallelism: usize, ) -> MetaResult<ObjectId>

source

pub async fn create_job_catalog( &self, streaming_job: &mut StreamingJob, ctx: &StreamContext, parallelism: &Option<Parallelism>, max_parallelism: usize, dependencies: HashSet<ObjectId>, ) -> MetaResult<()>

Create catalogs for the streaming job, then notify frontend about them if the job is a materialized view.

Some of the fields in the given streaming job are placeholders, which will be updated later in prepare_streaming_job and notify again in finish_streaming_job.

source

pub async fn create_internal_table_catalog( &self, job: &StreamingJob, incomplete_internal_tables: Vec<PbTable>, ) -> MetaResult<HashMap<u32, u32>>

Create catalogs for internal tables, then notify frontend about them if the job is a materialized view.

Some of the fields in the given “incomplete” internal tables are placeholders, which will be updated later in prepare_streaming_job and notify again in finish_streaming_job.

Returns a mapping from the temporary table id to the actual global table id.

source

pub async fn prepare_streaming_job( &self, table_fragments: &TableFragments, streaming_job: &StreamingJob, for_replace: bool, ) -> MetaResult<()>

source

pub async fn try_abort_creating_streaming_job( &self, job_id: ObjectId, is_cancelled: bool, ) -> MetaResult<(bool, Option<DatabaseId>)>

try_abort_creating_streaming_job is used to abort the job that is under initial status or in FOREGROUND mode. It returns (true, ) if the job is not found or aborted. It returns (, Some(database_id)) is the database_id of the job_id exists

source

pub async fn post_collect_table_fragments( &self, job_id: ObjectId, actor_ids: Vec<ActorId>, new_actor_dispatchers: HashMap<ActorId, Vec<PbDispatcher>>, split_assignment: &SplitAssignment, ) -> MetaResult<()>

source

pub async fn create_job_catalog_for_replace( &self, streaming_job: &StreamingJob, ctx: &StreamContext, version: &PbTableVersion, specified_parallelism: &Option<NonZeroUsize>, max_parallelism: usize, ) -> MetaResult<ObjectId>

source

pub async fn finish_streaming_job( &self, job_id: ObjectId, replace_table_job_info: Option<ReplaceTablePlan>, ) -> MetaResult<()>

finish_streaming_job marks job related objects as Created and notify frontend.

source

pub async fn finish_replace_streaming_job( &self, tmp_id: ObjectId, streaming_job: StreamingJob, merge_updates: Vec<PbMergeUpdate>, table_col_index_mapping: Option<ColIndexMapping>, creating_sink_id: Option<SinkId>, dropping_sink_id: Option<SinkId>, updated_sink_catalogs: Vec<SinkId>, ) -> MetaResult<NotificationVersion>

source

pub async fn finish_replace_streaming_job_inner( tmp_id: ObjectId, merge_updates: Vec<PbMergeUpdate>, table_col_index_mapping: Option<ColIndexMapping>, creating_sink_id: Option<SinkId>, dropping_sink_id: Option<SinkId>, updated_sink_catalogs: Vec<SinkId>, txn: &DatabaseTransaction, streaming_job: StreamingJob, ) -> MetaResult<(Vec<Relation>, Vec<PbFragmentWorkerSlotMapping>)>

source

pub async fn try_abort_replacing_streaming_job( &self, job_id: ObjectId, ) -> MetaResult<()>

try_abort_replacing_streaming_job is used to abort the replacing streaming job, the input job_id is the dummy job id.

source

pub async fn update_source_rate_limit_by_source_id( &self, source_id: SourceId, rate_limit: Option<u32>, ) -> MetaResult<HashMap<FragmentId, Vec<ActorId>>>

source

pub async fn update_backfill_rate_limit_by_job_id( &self, job_id: ObjectId, rate_limit: Option<u32>, ) -> MetaResult<HashMap<FragmentId, Vec<ActorId>>>

source

pub async fn post_apply_reschedules( &self, reschedules: HashMap<FragmentId, Reschedule>, table_parallelism_assignment: HashMap<TableId, TableParallelism>, ) -> MetaResult<()>

source

pub async fn list_rate_limits(&self) -> MetaResult<Vec<RateLimitInfo>>

Note: FsFetch created in old versions are not included. Since this is only used for debugging, it should be fine.

source§

impl CatalogController

source

pub(crate) async fn notify_users_update( &self, user_infos: Vec<PbUserInfo>, ) -> NotificationVersion

source

pub async fn create_user( &self, pb_user: PbUserInfo, ) -> MetaResult<NotificationVersion>

source

pub async fn update_user( &self, update_user: PbUserInfo, update_fields: &[PbUpdateField], ) -> MetaResult<NotificationVersion>

source

pub async fn drop_user( &self, user_id: UserId, ) -> MetaResult<NotificationVersion>

source

pub async fn grant_privilege( &self, user_ids: Vec<UserId>, new_grant_privileges: &[PbGrantPrivilege], grantor: UserId, ) -> MetaResult<NotificationVersion>

source

pub async fn revoke_privilege( &self, user_ids: Vec<UserId>, revoke_grant_privileges: &[PbGrantPrivilege], granted_by: UserId, revoke_by: UserId, revoke_grant_option: bool, cascade: bool, ) -> MetaResult<NotificationVersion>

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
§

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

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