pub struct SqliteTimerDriver<C = SystemClock> { /* private fields */ }Expand description
SQLite-backed durable timer source.
Implementations§
Source§impl SqliteTimerDriver<SystemClock>
impl SqliteTimerDriver<SystemClock>
Sourcepub fn open(path: impl AsRef<Path>) -> DurableResult<Self>
pub fn open(path: impl AsRef<Path>) -> DurableResult<Self>
Open or create a file-backed timer source.
Sourcepub fn in_memory() -> DurableResult<Self>
pub fn in_memory() -> DurableResult<Self>
Create an in-memory timer source.
Source§impl<C: Clock> SqliteTimerDriver<C>
impl<C: Clock> SqliteTimerDriver<C>
Sourcepub fn open_with_clock(path: impl AsRef<Path>, clock: C) -> DurableResult<Self>
pub fn open_with_clock(path: impl AsRef<Path>, clock: C) -> DurableResult<Self>
Open a file-backed timer source with an injected clock.
Sourcepub fn in_memory_with_clock(clock: C) -> DurableResult<Self>
pub fn in_memory_with_clock(clock: C) -> DurableResult<Self>
Create an in-memory timer source with an injected clock.
Trait Implementations§
Source§impl<C: Clock> WaitSourceDriver for SqliteTimerDriver<C>
impl<C: Clock> WaitSourceDriver for SqliteTimerDriver<C>
Source§fn receive(
&mut self,
index: &ParkedWaitIndex,
max_targets: usize,
) -> DurableResult<Option<WaitDelivery>>
fn receive( &mut self, index: &ParkedWaitIndex, max_targets: usize, ) -> DurableResult<Option<WaitDelivery>>
Return one delivery or
None when no work is currently available.Source§fn acknowledge(&mut self, activation_id: &str) -> DurableResult<()>
fn acknowledge(&mut self, activation_id: &str) -> DurableResult<()>
Acknowledge a delivery after its M1 CAS commit.
Auto Trait Implementations§
impl<C = SystemClock> !Freeze for SqliteTimerDriver<C>
impl<C = SystemClock> !RefUnwindSafe for SqliteTimerDriver<C>
impl<C = SystemClock> !Sync for SqliteTimerDriver<C>
impl<C = SystemClock> !UnwindSafe for SqliteTimerDriver<C>
impl<C> Send for SqliteTimerDriver<C>where
C: Send,
impl<C> Unpin for SqliteTimerDriver<C>where
C: Unpin,
impl<C> UnsafeUnpin for SqliteTimerDriver<C>where
C: UnsafeUnpin,
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