pub struct Claim {
pub class: OpClass,
pub bytes: u64,
pub enqueued: Instant,
}Expand description
What an admitted operation holds: a concurrency slot and a memory reservation, plus the instant it was admitted.
Deliberately not a Drop guard. The one guard is
AdmissionGuard, which owns this; two Drops over
one reservation is how a ledger comes to be released twice.
Fields§
§class: OpClassThe class, needed to release the right reservation and to file the sojourn under the right window.
bytes: u64What was reserved at admission (OpClass::admission_bytes).
Everything charged afterwards is counted by the guard that owns this
claim, so the release is bytes + grown and cannot drift.
enqueued: InstantEnqueue time — when the operation first asked for a slot, before any wait. The sojourn is measured from here.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Claim
impl RefUnwindSafe for Claim
impl Send for Claim
impl Sync for Claim
impl Unpin for Claim
impl UnsafeUnpin for Claim
impl UnwindSafe for Claim
Blanket Implementations§
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more