Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Trusted-host lifecycle ownership for runtime resources.

A ResourceScope closes admission and accounts for accepted work under one synchronous gate. Completion is retained: dropping an HTTP request or another waiter cannot cancel a scope finalizer once it has started.

Structs§

AdmissionClosed
Admission was closed before an operation could be registered.
CloseReport
The terminal result retained by a resource scope.
OperationLease
An admitted operation. It is completed exactly once when released.
ResourceScope
One trusted-host scope. Clones are access capabilities, never ownership transfers; resource finalization remains retained by the shared scope.
ResourceSnapshot
Inspectable state for one trusted-host resource.
RuntimeHandle
A cloneable command and observation capability for a supervisor.
RuntimeSupervisor
Trusted host owner for all runtime resource scopes.
WeakResourceScope
A non-owning observation capability for finalizers and controller facades. It prevents a resource’s retained finalizer from strongly owning its scope.

Enums§

LifecycleDependencyFailure
A dependency graph cannot establish an ordered finalization for a resource.
LifecycleReadinessError
A resource cannot be published as ready after admission closes or a tracked task has already made its lifecycle unavailable.
LifecycleRegistrationError
A lifecycle resource can no longer accept registration changes.
LifecycleState
A resource’s retained lifecycle state.
ResourceOwnership
Which layer owns the underlying resource rather than merely a scoped capability to use it.
ShutdownObservation
A bounded observation of retained supervisor shutdown work.
ShutdownOutstandingResources
The current availability of shutdown inventory for a budget-limited observer. SnapshotPending never means that no resources remain.

Functions§

current_scope
The trusted host scope carried by the currently admitted task, if any.
spawn_blocking
Start blocking work with its admission lease inside the actual worker. Dropping or timing out its join waiter cannot release that lease. Work started by an admitted host task inherits its lifecycle authority; direct compatibility callers retain an independent operation scope instead.