Skip to main content

DoseRecord

Trait DoseRecord 

Source
pub trait DoseRecord: Send {
    // Required methods
    fn going(&mut self, going: Going) -> Say;
    fn refused(&mut self);
    fn shown(&mut self);
    fn unshown(&mut self);
    fn pause(&mut self, until: i64) -> bool;
    fn over(&mut self);
    fn settled(&mut self) -> bool;
}
Expand description

What a dose’s reminder records, and asks, as it goes (docs/health.md, “What became of a reminder”), so that another device knows what this one did before it reminds the dose itself: each notice recorded before it goes (going), what became of it after. Its own device’s entry alone (sioul_core::dose_reminders).

Required Methods§

Source

fn going(&mut self, going: Going) -> Say

A notice of the dose is about to go: recorded so first (“maybe”: it may be on the screen from now on), then its words now. Say::Nothing: no longer to remind (marked, answered or reminded anywhere read here, the doses kept elsewhere now): nothing sent, nothing more tried.

Source

fn refused(&mut self)

The notice just recorded as going was refused (the bus or the server said no, or it could not be sent): it did not show, taken back.

Source

fn shown(&mut self)

One was shown: the server answered (late, or in time).

Source

fn unshown(&mut self)

The first try surely did not go out: nothing was sent.

Source

fn pause(&mut self, until: i64) -> bool

The tries pause, a phone’s alarm due meanwhile: promised, no notice until until (Unix seconds); false when no longer to remind (no more tries).

Source

fn over(&mut self)

No more tries (the grace’s end): promised, no notice again.

Source

fn settled(&mut self) -> bool

Whether the dose was marked or answered on any device, as read here now: a notice of it still shown is taken away.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§