pub struct Waiter { /* private fields */ }Expand description
The waiter’s state: the store it watches and what it must remember between ticks (only which inputs it has already failed on).
Implementations§
Source§impl Waiter
impl Waiter
Sourcepub fn new(store: Questions, home: PathBuf, conduct_cfg: Option<Config>) -> Self
pub fn new(store: Questions, home: PathBuf, conduct_cfg: Option<Config>) -> Self
A waiter over store, with home as the magi home its runs live under.
Sourcepub async fn tick(&mut self, now: Timestamp, halt: &(dyn Fn() -> bool + Sync))
pub async fn tick(&mut self, now: Timestamp, halt: &(dyn Fn() -> bool + Sync))
Look at every question once and act on what needs acting on. halt is
asked between questions and during a delivery: true means the daemon is
parking, and whatever is in flight is dropped, undelivered and
resumable.
Sourcepub fn can_resume(&self, q: &Question) -> bool
pub fn can_resume(&self, q: &Question) -> bool
Admission uses the very same target resolution as actual delivery.
Auto Trait Implementations§
impl Freeze for Waiter
impl RefUnwindSafe for Waiter
impl Send for Waiter
impl Sync for Waiter
impl Unpin for Waiter
impl UnsafeUnpin for Waiter
impl UnwindSafe for Waiter
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
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