pub struct SchedulesModule { /* private fields */ }Implementations§
Source§impl SchedulesModule
impl SchedulesModule
pub fn new(store: Arc<dyn DocumentStore>, clock: Option<Clock>) -> Self
Sourcepub fn on_change(&self, hook: Option<ChangeHook>)
pub fn on_change(&self, hook: Option<ChangeHook>)
Calls hook after every committed change (the ticker’s wake-up).
Sourcepub fn next_fire(&self) -> Result<Option<i64>, String>
pub fn next_fire(&self) -> Result<Option<i64>, String>
The earliest time a schedule fires (see next_fire_at), after the document loads; None: none will.
pub fn start(&self, host: &dyn TaskHost) -> Result<(), String>
pub fn handle( &self, kind: &str, payload: &Map<String, Value>, caller: Option<&str>, host: &dyn TaskHost, ) -> Result<Value, String>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SchedulesModule
impl !RefUnwindSafe for SchedulesModule
impl !UnwindSafe for SchedulesModule
impl Forget for SchedulesModule
impl Move for SchedulesModule
impl Send for SchedulesModule
impl Sync for SchedulesModule
impl Unpin for SchedulesModule
impl UnsafeUnpin for SchedulesModule
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