pub enum AllocationReleaseState {
Live,
Queued,
PartiallyUnmapped,
Released,
DeviceLost,
Quarantined,
}Expand description
Where one allocation’s ownership currently sits.
This is the shared vocabulary used by owning handles, prepared requests, mechanism snapshots, and release outcomes. It deliberately distinguishes “the bytes are gone” from “we still own something we could not give back”.
Variants§
Live
Live and mapped. The owner may still read, write, view, or release it.
Queued
Final ownership was handed to a deferred queue. The live record is already gone, so no further allocation-level operation can match it, but the physical bytes are not released yet.
PartiallyUnmapped
The allocator unmapped part of the allocation and stopped. Residual ownership is still held by the runtime and must not be reused.
Released
Released back to the allocator (which may have pooled rather than freed the bytes). This is the only success terminal state.
DeviceLost
The device or provider context was lost. No allocator call may be made, and reclamation happens only at confirmed context/process termination.
Quarantined
Ownership is retained deliberately because releasing it would be unsafe or dishonest. Quarantined ownership stays observable and blocks unsafe mechanism removal.
Implementations§
Source§impl AllocationReleaseState
impl AllocationReleaseState
Sourcepub const fn retains_ownership(self) -> bool
pub const fn retains_ownership(self) -> bool
Whether the runtime still owns physical bytes in this state.
Sourcepub const fn permits_allocator_call(self) -> bool
pub const fn permits_allocator_call(self) -> bool
Whether an allocator callback may still be made from this state.
Device loss is false by construction: the allocator is never called
after loss, in any phase.
Sourcepub const fn is_terminal(self) -> bool
pub const fn is_terminal(self) -> bool
Whether no further transition is expected without external teardown.
pub const fn name(self) -> &'static str
Trait Implementations§
Source§impl Clone for AllocationReleaseState
impl Clone for AllocationReleaseState
Source§fn clone(&self) -> AllocationReleaseState
fn clone(&self) -> AllocationReleaseState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more