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: AIdAccount id
tracker: Weak<MemoryQuotaTracker>The underlying tracker
cache: ClaimedQtyQuota 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 limitPRecord.used = Participation.cache + Σ Participation::claim - Σ P'n::releaseexcept ifPRecordhas 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 UnsafeUnpin for ParticipationInner
impl UnwindSafe for ParticipationInner
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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