pub struct NoteBook { /* private fields */ }Expand description
Which agents were told delivery paused, and which still await their resume note.
Implementations§
Source§impl NoteBook
impl NoteBook
Sourcepub fn pause(
&mut self,
since_ms: i64,
reason: &'static str,
agents: &[String],
) -> Vec<Note>
pub fn pause( &mut self, since_ms: i64, reason: &'static str, agents: &[String], ) -> Vec<Note>
Delivery has been paused a while: a note for every agent in agents.
Sourcepub fn pause_late_joiners(&mut self, agents: &[String]) -> Vec<Note>
pub fn pause_late_joiners(&mut self, agents: &[String]) -> Vec<Note>
While a pause note stands, agents that weren’t told yet.
Sourcepub fn told_paused(&self) -> Vec<String>
pub fn told_paused(&self) -> Vec<String>
The agents told about the current pause.
Sourcepub fn resumed(
&mut self,
at_ms: i64,
waiting: impl Fn(&str, &str) -> bool,
) -> Vec<Note>
pub fn resumed( &mut self, at_ms: i64, waiting: impl Fn(&str, &str) -> bool, ) -> Vec<Note>
Delivery is back at at_ms. An agent whose pause note still waits
(waiting(agent, PAUSED_KEY)) gets an outage note in its place now,
going back to an earlier outage whose note waits too
(waiting(agent, OUTAGE_KEY)). Every other agent told about the pause
gets a resume note after its first pull (see Self::fetched).
Sourcepub fn left_at_relay(&mut self, agent: &str, now_ms: i64)
pub fn left_at_relay(&mut self, agent: &str, now_ms: i64)
A relay message for agent was left at the relay at now_ms, because the agent could not work.
Sourcepub fn has_left_at_relay(&self, agent: &str) -> bool
pub fn has_left_at_relay(&self, agent: &str) -> bool
Whether messages for agent were left at the relay and it has not been told.
Sourcepub fn can_work_again(&mut self, agent: &str) -> Option<Note>
pub fn can_work_again(&mut self, agent: &str) -> Option<Note>
agent can work again: its one note about the messages left at the relay, when there were any.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NoteBook
impl RefUnwindSafe for NoteBook
impl Send for NoteBook
impl Sync for NoteBook
impl Unpin for NoteBook
impl UnsafeUnpin for NoteBook
impl UnwindSafe for NoteBook
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§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> ⓘ
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