Skip to main content

RuntimeOperation

Enum RuntimeOperation 

Source
#[non_exhaustive]
pub enum RuntimeOperation {
Show 55 variants BuildTokioRuntime, LoadConfigFile, DeserializeConfigFile, DetectProcessMemoryLimit, ResolveManagedMemoryBudget, ReadFile, ReadFileBackup, PersistMetadata, MetadataCreateParent, MetadataCreateTemporary, MetadataWriteTemporary, MetadataSyncTemporary, MetadataReplaceTarget, MetadataSyncParent, MetadataRemoveTemporary, WaitForDurableMetadata, AdmitMetadataSnapshot, AdmitMetadataOperation, AdmitMetadataBytes, MetadataWorkerStopped, MetadataIoClosed, RegisterSigtermHandler, RegisterSigintHandler, WaitForSignal, CreateTaskGroupChild, SpawnTaskGroupTask, SpawnServiceTask, SpawnSchedulerTask, RuntimeContext, StartServiceLifecycle, ServiceLifecycleTaskGroup, BindServiceHealthProbe, InspectServiceHealthProbe, MarkServiceReady, SuspendServiceReadiness, RestoreServiceReadiness, ShutdownRuntimeBlocking, BlockingQueueAdmission, RunBlockingTask, BlockingTaskDeadline, BlockingTask, BlockingExecutorKind, ShutdownBlockingExecutor, ClearCompletedSchedules, RegisterScheduledTask, SpawnOperation, OperationOwner, MetadataIo, ServiceLifecycleEnvironment, ServiceLifecycleProbeAddress, ServiceLifecycleDuration, ServiceLifecycleDurationRange, ServiceLifecycleDrainMethods, MetadataResourceTarget, External(ExternalOperation),
}
Expand description

A closed, low-cardinality runtime operation identifier.

Runtime failures carry this value instead of caller-provided text so that diagnostics remain aggregatable and cannot disclose request, path, or configuration values. The named variants are operations this crate performs. A crate built on the runtime labels its own operations with Self::External instead of adding variants here.

New runtime operations may be added in a minor release, so a match outside this crate needs a wildcard arm.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

BuildTokioRuntime

Builds an owned Tokio runtime.

§

LoadConfigFile

Loads a runtime configuration file.

§

DeserializeConfigFile

Deserializes a runtime configuration file.

§

DetectProcessMemoryLimit

Detects the process memory limit.

§

ResolveManagedMemoryBudget

Resolves the managed memory budget from the effective limit.

§

ReadFile

Reads a file.

§

ReadFileBackup

Reads a file before creating a backup.

§

PersistMetadata

Persists metadata through a compatibility filesystem path.

§

MetadataCreateParent

Creates a metadata parent directory.

§

MetadataCreateTemporary

Creates a metadata temporary file.

§

MetadataWriteTemporary

Writes a metadata temporary file.

§

MetadataSyncTemporary

Synchronizes a metadata temporary file.

§

MetadataReplaceTarget

Replaces a metadata target file.

§

MetadataSyncParent

Synchronizes a metadata parent directory.

§

MetadataRemoveTemporary

Removes a metadata temporary file.

§

WaitForDurableMetadata

Waits for metadata durability.

§

AdmitMetadataSnapshot

Admits a metadata snapshot.

§

AdmitMetadataOperation

Admits metadata work.

§

AdmitMetadataBytes

Admits metadata bytes.

§

MetadataWorkerStopped

Uses a stopped metadata worker.

§

MetadataIoClosed

Uses a closed metadata actor.

§

RegisterSigtermHandler

Registers the SIGTERM handler.

§

RegisterSigintHandler

Registers the SIGINT handler.

§

WaitForSignal

Waits for an operating-system signal.

§

CreateTaskGroupChild

Creates a task-group child.

§

SpawnTaskGroupTask

Spawns a task-group task.

§

SpawnServiceTask

Spawns a service task.

§

SpawnSchedulerTask

Spawns a scheduler task.

§

RuntimeContext

Uses the ambient runtime context.

§

StartServiceLifecycle

Starts a service lifecycle.

§

ServiceLifecycleTaskGroup

Uses a service lifecycle task group.

§

BindServiceHealthProbe

Binds a service health probe.

§

InspectServiceHealthProbe

Inspects a service health probe.

§

MarkServiceReady

Marks a service ready.

§

SuspendServiceReadiness

Suspends service readiness.

§

RestoreServiceReadiness

Restores service readiness.

§

ShutdownRuntimeBlocking

Shuts down an owned runtime from a blocking caller.

§

BlockingQueueAdmission

Performs blocking executor admission.

§

RunBlockingTask

Runs a blocking task.

§

BlockingTaskDeadline

Waits for a blocking task deadline.

§

BlockingTask

Waits for a blocking task.

§

BlockingExecutorKind

Uses an unsupported blocking executor kind.

§

ShutdownBlockingExecutor

Waiting for an isolated blocking executor to release its work.

§

ClearCompletedSchedules

Clears completed scheduled registrations.

§

RegisterScheduledTask

Registers a scheduled task.

§

SpawnOperation

Spawns an operation.

§

OperationOwner

Validates an operation owner.

§

MetadataIo

Performs metadata I/O through an adapter.

§

ServiceLifecycleEnvironment

Reads service lifecycle environment configuration.

§

ServiceLifecycleProbeAddress

Parses a service lifecycle probe address.

§

ServiceLifecycleDuration

Parses a service lifecycle duration.

§

ServiceLifecycleDurationRange

Validates a service lifecycle duration range.

§

ServiceLifecycleDrainMethods

Parses the HTTP methods accepted by the drain probe.

§

MetadataResourceTarget

Validates metadata resource targeting.

§

External(ExternalOperation)

An operation owned by a crate that builds on the runtime.

Implementations§

Source§

impl RuntimeOperation

Source

pub const fn external(label: &'static str) -> Self

Labels an operation owned outside this crate.

Define the result as a constant so an invalid label fails compilation; see ExternalOperation::new for the accepted form.

§Panics

Panics when label violates the ExternalOperation::new contract.

Trait Implementations§

Source§

impl Clone for RuntimeOperation

Source§

fn clone(&self) -> Self

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 Copy for RuntimeOperation

Source§

impl Debug for RuntimeOperation

Source§

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

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

impl Display for RuntimeOperation

Source§

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

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

impl Eq for RuntimeOperation

Source§

impl Hash for RuntimeOperation

Source§

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

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

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

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

impl PartialEq for RuntimeOperation

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RuntimeOperation

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

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

Source§

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

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

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

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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