#[non_exhaustive]pub struct OwnershipSnapshot {
pub configured_limit: Option<usize>,
pub effective_limit: Option<usize>,
pub available: Option<usize>,
pub waiters: usize,
pub admission_open: bool,
pub cleanup_queued: usize,
pub cleanup_running: usize,
}Expand description
Point-in-time ownership-admission and deferred-cleanup state.
Finite capacity is shared by accepted tasks and configured subscribers. A unit remains in use until its final user-owned values finish isolated destruction. Destructor failure can permanently reduce the effective limit.
The three limit fields are None when ownership admission is configured as unlimited.
Cleanup counts remain available in that mode.
Configured, effective, available, and waiter values are copied under one broker lock.
admission_open also combines a separate runtime-lifecycle read, and cleanup values are copied under the worker lock.
A concurrent transition can therefore appear in only one part of this rolling snapshot.
The complete value can also become stale immediately after it is returned.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.configured_limit: Option<usize>Original finite ownership limit, or None for unlimited admission.
effective_limit: Option<usize>Usable finite limit after permanent retirement, or None for unlimited admission.
available: Option<usize>Finite units not held by permits or grants, or None for unlimited admission.
waiters: usizeRequests currently parked in finite-capacity admission.
A complete grant that has not yet been observed is already counted as in use, not as a waiter.
admission_open: boolWhether the runtime and ownership broker still accept new requests.
An open snapshot may have no currently available units.
cleanup_queued: usizeDeferred-cleanup batches waiting for a destructor-isolation worker.
cleanup_running: usizeDeferred-cleanup batches claimed by workers and not yet completed.
Implementations§
Trait Implementations§
Source§impl Clone for OwnershipSnapshot
impl Clone for OwnershipSnapshot
Source§fn clone(&self) -> OwnershipSnapshot
fn clone(&self) -> OwnershipSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more