pub struct Tracker { /* private fields */ }Expand description
One reader’s deadline tracker for one provider address and one resource
(§2.5): a pure state machine over (instant, event) inputs. At each
event it first judges every member it holds at that instant, then
applies the event; Tracker::next_due is when a miss is next due, for
a one-shot timer that meets the detection bound.
Implementations§
Source§impl Tracker
impl Tracker
Sourcepub fn new<S: Into<String>>(
deadline: Duration,
bound: Option<u64>,
known: impl IntoIterator<Item = S>,
) -> Self
pub fn new<S: Into<String>>( deadline: Duration, bound: Option<u64>, known: impl IntoIterator<Item = S>, ) -> Self
A tracker for a resource whose judged deadline is deadline
(Declared::judged_deadline) and whose bound is bound (core
§2.7: the instance’s stated cardinality, else the contract’s; 1 for
a template without parameters; None for no bound), holding the
known members (§0) from the first.
Sourcepub fn with_epoch(self) -> Self
pub fn with_epoch(self) -> Self
The tracker of a template that declares epoch (core §2.3, §8.1;
§2.5, text 0.2, F-261): a known member is waited for from the
instant a member token of it is first seen, never from its owner’s
presence, since a member exists from its owner’s first declaration
of it; and its member tokens gone end it only after one was seen.
Sourcepub fn owner(&self) -> OwnerState
pub fn owner(&self) -> OwnerState
The owner’s state as last given.
Sourcepub fn state(&self, member: &str) -> Option<MemberState>
pub fn state(&self, member: &str) -> Option<MemberState>
Where a held member stands.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Tracker
impl Freeze for Trackerwhere
*const LeafNode<String, Held> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Held)>>: Freeze,
*const LeafNode<String, Mono> is !null: Freeze,
PhantomData<Box<(String, Mono)>>: Freeze,
*const LeafNode<String, SetValZST> is !null: Freeze,
PhantomData<Box<(String, SetValZST)>>: Freeze,
impl Move for Tracker
impl RefUnwindSafe for Tracker
impl Send for Tracker
impl Sync for Tracker
impl Unpin for Tracker
impl UnsafeUnpin for Trackerwhere
*const LeafNode<String, Held> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Held)>>: UnsafeUnpin,
*const LeafNode<String, Mono> is !null: UnsafeUnpin,
PhantomData<Box<(String, Mono)>>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
impl UnwindSafe for Trackerwhere
BTreeMap<String, Held>: UnwindSafe,
BTreeMap<String, Mono>: UnwindSafe,
BTreeMap<String, SetValZST>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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