pub struct InMemoryJobQueue { /* private fields */ }Expand description
In-memory job queue implementation for testing and development
Implementations§
Trait Implementations§
Source§impl Default for InMemoryJobQueue
impl Default for InMemoryJobQueue
Source§impl JobQueue for InMemoryJobQueue
impl JobQueue for InMemoryJobQueue
Source§fn enqueue<'life0, 'async_trait>(
&'life0 self,
job: Job,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enqueue<'life0, 'async_trait>(
&'life0 self,
job: Job,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add a job to the queue
Source§fn dequeue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dequeue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the next job from the queue, blocks until a job is available or timeout
Source§fn dequeue_with_timeout<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dequeue_with_timeout<'life0, 'async_trait>(
&'life0 self,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the next job from the queue with timeout
Auto Trait Implementations§
impl !Freeze for InMemoryJobQueue
impl !RefUnwindSafe for InMemoryJobQueue
impl Send for InMemoryJobQueue
impl Sync for InMemoryJobQueue
impl Unpin for InMemoryJobQueue
impl !UnwindSafe for InMemoryJobQueue
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