pub struct UsageReads { /* private fields */ }Expand description
See the module docs. process_table is the one production instance.
Implementations§
Source§impl UsageReads
impl UsageReads
Sourcepub fn held_at(
&self,
key: &str,
now_ms: u64,
) -> Option<(TransientReadFailure, u64)>
pub fn held_at( &self, key: &str, now_ms: u64, ) -> Option<(TransientReadFailure, u64)>
The active hold for key: its failure and when it ends.
Sourcepub fn record_at(&self, key: &str, fetched: Fetched, now_ms: u64) -> ReadResult
pub fn record_at(&self, key: &str, fetched: Fetched, now_ms: u64) -> ReadResult
Record one network read for key at now_ms and classify it.
Sourcepub fn last_good_for(
&self,
key: &str,
current: &SeatIdentity,
) -> Option<UsageSnapshot>
pub fn last_good_for( &self, key: &str, current: &SeatIdentity, ) -> Option<UsageSnapshot>
The slot’s last successful snapshot, if it was read from the account
now stored in the slot (current): never another account’s reading.
Sourcepub fn forget_last_good(&self, key: &str)
pub fn forget_last_good(&self, key: &str)
Drop the slot’s last good reading (e.g. after a reported limit).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for UsageReads
impl RefUnwindSafe for UsageReads
impl Send for UsageReads
impl Sync for UsageReads
impl Unpin for UsageReads
impl UnsafeUnpin for UsageReads
impl UnwindSafe for UsageReads
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