pub struct ParticipationInner {
pid: Ref<PId>,
aid: AId,
tracker: Weak<MemoryQuotaTracker>,
cache: ClaimedQty,
}
Expand description
Contents of an enabled Participation
Fields§
§pid: Ref<PId>
Participant id
aid: AId
Account id
tracker: Weak<MemoryQuotaTracker>
The underlying tracker
cache: ClaimedQty
Quota we have preemptively claimed for use by this Account
Has been added to PRecord.used
,
but not yet returned by Participation::claim
.
This cache field arranges that most of the time we don’t have to hammer a single cache line.
The value here is bounded by a configured limit.
Invariants on memory accounting:
Participation.cache < configured limit
PRecord.used = Participation.cache + Σ Participation::claim - Σ P'n::release
except ifPRecord
has been deleted (ie when we aren’t tracking any more and think the Participant isCollapsing
).Σ PRecord.used = State.total_used
Enforcement of these invariants is partially assured by
types in bookkeeping
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParticipationInner
impl RefUnwindSafe for ParticipationInner
impl Send for ParticipationInner
impl Sync for ParticipationInner
impl Unpin for ParticipationInner
impl UnwindSafe for ParticipationInner
Blanket Implementations§
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more