pub struct InMemQueue { /* private fields */ }Expand description
In-memory JobQueue for tests, examples and single-process hosts.
Times come from the injected clock, so tests move leases forward
with a FixedClock.
Implementations§
Trait Implementations§
Source§impl JobQueue for InMemQueue
impl JobQueue for InMemQueue
fn enqueue<'life0, 'async_trait>(
&'life0 self,
run_id: RunId,
due_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn claim_due<'life0, 'async_trait>(
&'life0 self,
limit: usize,
lease_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Lease>, CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
lease: &'life1 Lease,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fail<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
lease: &'life1 Lease,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reschedule<'life0, 'life1, 'async_trait>(
&'life0 self,
lease: &'life1 Lease,
due_ms: i64,
) -> Pin<Box<dyn Future<Output = Result<(), CoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for InMemQueue
impl !RefUnwindSafe for InMemQueue
impl !UnwindSafe for InMemQueue
impl Forget for InMemQueue
impl Move for InMemQueue
impl Send for InMemQueue
impl Sync for InMemQueue
impl Unpin for InMemQueue
impl UnsafeUnpin for InMemQueuewhere
*const ArcInner<dyn Clock> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Clock>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(RunId, Job)>: 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