pub(crate) struct CompactionScheduler {
scheduler: SchedulerRef,
region_status: HashMap<RegionId, CompactionStatus>,
request_sender: Sender<WorkerRequestWithTime>,
cache_manager: CacheManagerRef,
engine_config: Arc<MitoConfig>,
memory_manager: Arc<CompactionMemoryManager>,
memory_policy: OnExhaustedPolicy,
listener: WorkerListener,
plugins: Plugins,
next_plan_id: u64,
}Expand description
Compaction scheduler tracks and manages compaction tasks.
Fields§
§scheduler: SchedulerRef§region_status: HashMap<RegionId, CompactionStatus>All loaded regions, including idle regions and regions executing DDLs.
request_sender: Sender<WorkerRequestWithTime>Request sender of the worker that this scheduler belongs to.
cache_manager: CacheManagerRef§engine_config: Arc<MitoConfig>§memory_manager: Arc<CompactionMemoryManager>§memory_policy: OnExhaustedPolicy§listener: WorkerListener§plugins: PluginsPlugins for the compaction scheduler.
next_plan_id: u64Scheduler-wide generation counter for compaction plans and executions. It outlives region statuses so close/reopen cannot reuse an old identity.
Implementations§
Source§impl CompactionScheduler
impl CompactionScheduler
Sourcepub(crate) fn prepare_local_units(
&mut self,
region: CompactionRegion,
units: Vec<CompactionUnit>,
reserved: CompactingFiles,
) -> CompactionPhase
pub(crate) fn prepare_local_units( &mut self, region: CompactionRegion, units: Vec<CompactionUnit>, reserved: CompactingFiles, ) -> CompactionPhase
Builds unit tasks with fresh execution IDs and shares their already-reserved inputs.
Sourcefn local_units_mut(
&mut self,
region_id: RegionId,
) -> Option<&mut LocalCompaction>
fn local_units_mut( &mut self, region_id: RegionId, ) -> Option<&mut LocalCompaction>
Returns local unit state only while the region is in a local execution phase.
Sourcepub(crate) fn dispatch_local_units(&mut self, region_id: RegionId)
pub(crate) fn dispatch_local_units(&mut self, region_id: RegionId)
Submits pending units up to the request limit and arranges task-exit notifications.
Sourcepub(crate) fn can_apply_unit(&self, region_id: RegionId, id: u64) -> bool
pub(crate) fn can_apply_unit(&self, region_id: RegionId, id: u64) -> bool
Accepts an edit from any current unit that has started committing and is not finished.
Sourcepub(crate) fn on_unit_finished(
&mut self,
region_id: RegionId,
id: u64,
result: Result<bool, Arc<Error>>,
)
pub(crate) fn on_unit_finished( &mut self, region_id: RegionId, id: u64, result: Result<bool, Arc<Error>>, )
Records apply progress or failure without ending sibling executions.
Sourcepub(crate) async fn on_unit_released(
&mut self,
region_id: RegionId,
id: u64,
manifest: &Arc<ManifestContext>,
schemas: SchemaMetadataManagerRef,
) -> CompactionTransition
pub(crate) async fn on_unit_released( &mut self, region_id: RegionId, id: u64, manifest: &Arc<ManifestContext>, schemas: SchemaMetadataManagerRef, ) -> CompactionTransition
Accounts for task exit, starts pending units, and checks request completion.
Sourcepub(crate) async fn finish_local_units(
&mut self,
region_id: RegionId,
manifest: &Arc<ManifestContext>,
schemas: SchemaMetadataManagerRef,
) -> CompactionTransition
pub(crate) async fn finish_local_units( &mut self, region_id: RegionId, manifest: &Arc<ManifestContext>, schemas: SchemaMetadataManagerRef, ) -> CompactionTransition
Completes the request only after all units exit, using the existing terminal paths.
Source§impl CompactionScheduler
impl CompactionScheduler
pub(super) fn dispatch_compaction_planning( &self, plan_id: u64, request: CompactionRequest, options: Options, time_range: Option<TimestampRange>, )
Sourcepub(super) async fn notify_planning_result(
region_id: RegionId,
plan_id: u64,
request_sender: Sender<WorkerRequestWithTime>,
planning: impl Future<Output = CompactionPlanningResult> + Send,
)
pub(super) async fn notify_planning_result( region_id: RegionId, plan_id: u64, request_sender: Sender<WorkerRequestWithTime>, planning: impl Future<Output = CompactionPlanningResult> + Send, )
Runs the planning future and always sends the planning result back to the worker, even if the planning panics.
The worker only leaves the picking phase after it receives the
CompactionPickFinished notification. If a panicked planning task
swallowed the notification, the region would be stuck in the picking
phase forever, blocking all future compactions and pending DDLs (e.g.
entering staging) of the region.
async fn prepare_compaction( request: CompactionRequest, options: Options, plugins: Plugins, max_background_compactions: usize, time_range: Option<TimestampRange>, ) -> CompactionPlanningResult
Sourcepub(super) async fn handle_compaction_pick_finished_inner(
&mut self,
finished: CompactionPickFinished,
manifest_ctx: &Arc<ManifestContext>,
schema_metadata_manager: SchemaMetadataManagerRef,
) -> CompactionTransition
pub(super) async fn handle_compaction_pick_finished_inner( &mut self, finished: CompactionPickFinished, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, ) -> CompactionTransition
Applies a background planning result to the current compaction lifecycle.
§Returns
Reports an automatic follow-up dispatched after Picking, or DDL requests released when Picking terminates without creating an execution. The owning worker must dispatch returned DDLs immediately because no execution callback will follow.
async fn finish_compaction_planning( &mut self, region_id: RegionId, err: Option<Arc<Error>>, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, ) -> CompactionTransition
Sourceasync fn prepare_or_submit_compaction(
&mut self,
prepared: PreparedCompaction,
files: CompactingFiles,
waiters: Vec<OutputTx>,
plan_id: u64,
) -> Result<Option<CompactionPhase>>
async fn prepare_or_submit_compaction( &mut self, prepared: PreparedCompaction, files: CompactingFiles, waiters: Vec<OutputTx>, plan_id: u64, ) -> Result<Option<CompactionPhase>>
Submits a remote job, or prepares local unit tasks without submitting them. The caller dispatches local units after installing the returned phase.
fn exceeds_compaction_memory_limit(&self, estimated_bytes: u64) -> Option<u64>
Source§impl CompactionScheduler
impl CompactionScheduler
Sourcepub(crate) fn new(
scheduler: SchedulerRef,
request_sender: Sender<WorkerRequestWithTime>,
cache_manager: CacheManagerRef,
engine_config: Arc<MitoConfig>,
listener: WorkerListener,
plugins: Plugins,
memory_manager: Arc<CompactionMemoryManager>,
memory_policy: OnExhaustedPolicy,
) -> Self
pub(crate) fn new( scheduler: SchedulerRef, request_sender: Sender<WorkerRequestWithTime>, cache_manager: CacheManagerRef, engine_config: Arc<MitoConfig>, listener: WorkerListener, plugins: Plugins, memory_manager: Arc<CompactionMemoryManager>, memory_policy: OnExhaustedPolicy, ) -> Self
Creates an empty scheduler bound to one region worker.
§Effects
Stores the worker request sender and shared scheduling resources. No compaction is dispatched until a scheduling method is called.
§Constraints
All lifecycle methods on the returned scheduler must be driven by the same worker so region state transitions remain serialized.
Sourcepub(crate) fn register_region(
&mut self,
version_control: &Arc<VersionControl>,
access_layer: &AccessLayerRef,
)
pub(crate) fn register_region( &mut self, version_control: &Arc<VersionControl>, access_layer: &AccessLayerRef, )
Registers a loaded region; replacing its VersionControl invalidates the old incarnation.
Sourcepub(crate) fn schedule_automatic_compaction(
&mut self,
compact_options: Options,
version_control: &Arc<VersionControl>,
access_layer: &AccessLayerRef,
manifest_ctx: &Arc<ManifestContext>,
schema_metadata_manager: SchemaMetadataManagerRef,
) -> Result<bool>
pub(crate) fn schedule_automatic_compaction( &mut self, compact_options: Options, version_control: &Arc<VersionControl>, access_layer: &AccessLayerRef, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, ) -> Result<bool>
Accepts an automatic compaction trigger for a region.
§Effects
Starts planning when the registered region is idle.
Otherwise, an active status coalesces the trigger into one unrestricted
follow-up cycle. Returns true only when this call dispatches planning.
§Constraints
The owning region worker must call this method serially. Automatic
triggers have no waiter and may be ignored while a DDL fence is active.
The region identity comes from version_control; access_layer and
manifest_ctx must belong to the same region.
Sourcepub(crate) fn schedule_manual_compaction(
&mut self,
compact_options: Options,
version_control: &Arc<VersionControl>,
access_layer: &AccessLayerRef,
waiter: OptionOutputTx,
manifest_ctx: &Arc<ManifestContext>,
schema_metadata_manager: SchemaMetadataManagerRef,
max_parallelism: usize,
time_range: Option<TimestampRange>,
) -> Result<bool>
pub(crate) fn schedule_manual_compaction( &mut self, compact_options: Options, version_control: &Arc<VersionControl>, access_layer: &AccessLayerRef, waiter: OptionOutputTx, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, max_parallelism: usize, time_range: Option<TimestampRange>, ) -> Result<bool>
Accepts a manual compaction request for a region.
§Effects
Starts planning when the registered region is idle. During
an automatic compaction, queues the request and replaces any older
pending manual request; during a manual compaction, rejects the new
request through waiter. Returns true only when this call dispatches
planning.
§Constraints
The owning region worker must call this method serially. The supplied
waiter is completed exactly once by cycle completion, replacement,
cancellation, failure, or region teardown. The region identity comes
from version_control; access_layer and manifest_ctx must belong to
the same region.
Sourcepub(crate) async fn handle_compaction_pick_finished(
&mut self,
finished: CompactionPickFinished,
manifest_ctx: &Arc<ManifestContext>,
schema_metadata_manager: SchemaMetadataManagerRef,
) -> CompactionTransition
pub(crate) async fn handle_compaction_pick_finished( &mut self, finished: CompactionPickFinished, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, ) -> CompactionTransition
Applies a background planning result to the current region state.
§Effects
Rejects stale plans, submits a prepared local or remote execution, or completes the cycle when planning produced no executable plan. The returned transition reports a dispatched automatic follow-up or DDL requests released by the resulting terminal transition.
§Constraints
The owning worker must call this method for planning notifications and must execute every returned DDL request. The notification may be stale; stale notifications intentionally have no effect.
Sourcepub(crate) fn is_current_execution(
&self,
region_id: RegionId,
execution: &CompactionExecution,
) -> bool
pub(crate) fn is_current_execution( &self, region_id: RegionId, execution: &CompactionExecution, ) -> bool
Returns whether a terminal notification belongs to the installed execution.
§Effects
Performs a read-only identity check against the region’s current plan.
§Constraints
Callers must check this before applying a compaction edit. Matching only the region id is insufficient because close/reopen can replace a status.
Sourcepub(crate) async fn on_execution_finished(
&mut self,
region_id: RegionId,
execution: &CompactionExecution,
manifest_ctx: &Arc<ManifestContext>,
schema_metadata_manager: SchemaMetadataManagerRef,
made_progress: bool,
) -> CompactionTransition
pub(crate) async fn on_execution_finished( &mut self, region_id: RegionId, execution: &CompactionExecution, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, made_progress: bool, ) -> CompactionTransition
Completes the installed execution after its edit has been applied.
§Effects
Notifies waiters, schedules a pending manual or automatic follow-up, or
returns the region to idle. A follow-up is scheduled whenever the cycle
latched an automatic trigger, or when made_progress is true (the
execution produced output or reduced the file count): successful compaction
keeps draining the region until the picker returns no plan. The returned
transition reports a dispatched automatic follow-up or DDLs that are now
safe to execute.
§Constraints
The owning worker must call this only after accepting and applying the execution’s result, and must execute every returned DDL request. Stale executions are ignored.
Sourcepub(crate) fn on_execution_failed(
&mut self,
region_id: RegionId,
execution: &CompactionExecution,
err: Arc<Error>,
)
pub(crate) fn on_execution_failed( &mut self, region_id: RegionId, execution: &CompactionExecution, err: Arc<Error>, )
Sourcepub(crate) fn on_region_dropped(&mut self, region_id: RegionId)
pub(crate) fn on_region_dropped(&mut self, region_id: RegionId)
Sourcepub(crate) fn on_region_closed(&mut self, region_id: RegionId)
pub(crate) fn on_region_closed(&mut self, region_id: RegionId)
Sourcepub(crate) fn on_region_truncated(&mut self, region_id: RegionId)
pub(crate) fn on_region_truncated(&mut self, region_id: RegionId)
Sourcepub(crate) fn try_cancel_and_add_ddl<T>(
&mut self,
region_id: RegionId,
sender: OptionOutputTx,
request: T,
into_ddl_request: impl FnOnce(T) -> DdlRequest,
) -> Result<(), (OptionOutputTx, T)>
pub(crate) fn try_cancel_and_add_ddl<T>( &mut self, region_id: RegionId, sender: OptionOutputTx, request: T, into_ddl_request: impl FnOnce(T) -> DdlRequest, ) -> Result<(), (OptionOutputTx, T)>
Cancels a running compaction and queues its dependent DDL atomically.
§Effects
Requests cancellation when the active phase can still stop, then queues the DDL. The queued DDL forms a scheduling fence for subsequent compaction triggers. If no compaction is running, returns the sender and typed request unchanged.
§Constraints
Production callers use this only for DdlRequest::Truncate and
DdlRequest::EnterStaging. Ok(()) means the caller must wait for a
terminal callback to receive and execute the queued DDL; Err means the
caller must execute the returned request directly.
Source§impl CompactionScheduler
impl CompactionScheduler
Sourcefn next_plan_id(counter: &mut u64) -> u64
fn next_plan_id(counter: &mut u64) -> u64
Returns the current plan id and advances the counter.
Takes the counter instead of &mut self so callers can bump it while
holding a mutable borrow of a region status.
fn schedule_compaction( &mut self, trigger: CompactionTrigger, compact_options: Options, version_control: &Arc<VersionControl>, access_layer: &AccessLayerRef, waiter: OptionOutputTx, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, max_parallelism: usize, time_range: Option<TimestampRange>, ) -> Result<bool>
fn handle_pending_compaction_request( &mut self, region_id: RegionId, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, ) -> bool
Sourceasync fn on_compaction_finished(
&mut self,
region_id: RegionId,
manifest_ctx: &Arc<ManifestContext>,
schema_metadata_manager: SchemaMetadataManagerRef,
made_progress: bool,
) -> CompactionTransition
async fn on_compaction_finished( &mut self, region_id: RegionId, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, made_progress: bool, ) -> CompactionTransition
Notifies the scheduler that the compaction job is finished successfully.
fn schedule_automatic_followup( &mut self, region_id: RegionId, manifest_ctx: &Arc<ManifestContext>, schema_metadata_manager: SchemaMetadataManagerRef, ) -> bool
Sourcefn on_compaction_failed(&mut self, region_id: RegionId, err: Arc<Error>)
fn on_compaction_failed(&mut self, region_id: RegionId, err: Arc<Error>)
Notifies the scheduler that the compaction job is failed.
Sourcefn remove_region(&mut self, region_id: RegionId, err: Arc<Error>)
fn remove_region(&mut self, region_id: RegionId, err: Arc<Error>)
Unregisters a closed or dropped region and fails its queued requests.
Sourcefn fail_compaction(&mut self, region_id: RegionId, err: Arc<Error>)
fn fail_compaction(&mut self, region_id: RegionId, err: Arc<Error>)
Fails a cycle without discarding the loaded region’s registration.
Sourcefn finish_compaction_on_cancel(
&mut self,
region_id: RegionId,
) -> Vec<SenderDdlRequest>
fn finish_compaction_on_cancel( &mut self, region_id: RegionId, ) -> Vec<SenderDdlRequest>
Returns the cycle to idle and records any DDL handoff in the same resident entry.
Sourcefn take_ready_ddls(
&mut self,
region_id: RegionId,
) -> Option<Vec<SenderDdlRequest>>
fn take_ready_ddls( &mut self, region_id: RegionId, ) -> Option<Vec<SenderDdlRequest>>
Hands off pending DDLs after compaction ends and cancels remaining compaction waiters.
Sourcefn fence_ddl_replies(
&mut self,
region_id: RegionId,
ddls: Vec<SenderDdlRequest>,
) -> Vec<SenderDdlRequest>
fn fence_ddl_replies( &mut self, region_id: RegionId, ddls: Vec<SenderDdlRequest>, ) -> Vec<SenderDdlRequest>
Hands off a drained batch of DDLs and fences new compaction until every reply lands.
Installs the fence, intercepts each DDL’s reply, and returns the same batch so the caller can execute it. The real result of each DDL is still forwarded to its original sender.
§Constraints
Must only be called from a compaction terminal transition, and only by the worker that owns
region_id.
Sourcepub(crate) fn on_ddl_complete(
&mut self,
region_id: RegionId,
generation: u64,
request_index: usize,
)
pub(crate) fn on_ddl_complete( &mut self, region_id: RegionId, generation: u64, request_index: usize, )
Releases the DDL fence after its last reply, ignoring replies from an older generation.
Trait Implementations§
Source§impl Drop for CompactionScheduler
impl Drop for CompactionScheduler
Auto Trait Implementations§
impl !RefUnwindSafe for CompactionScheduler
impl !UnwindSafe for CompactionScheduler
impl Freeze for CompactionScheduler
impl Send for CompactionScheduler
impl Sync for CompactionScheduler
impl Unpin for CompactionScheduler
impl UnsafeUnpin for CompactionScheduler
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
§impl<T> AnySync for T
impl<T> AnySync for T
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<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> ErasedDestructor for Twhere
T: 'static,
§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> Fruit for Twhere
T: Send + Downcast,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> 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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSend for Twhere
T: Send,
§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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
x-request-id as the header name. Read more§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
x-request-id as the header name. Read more§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read more§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read more§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
§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.