Struct qm_redis::work_queue::WorkQueue
source · pub struct WorkQueue { /* private fields */ }Implementations§
source§impl WorkQueue
impl WorkQueue
pub fn new(name: KeyPrefix) -> WorkQueue
pub async fn recover<C: AsyncCommands>(&self, db: &mut C) -> RedisResult<()>
pub fn add_item_to_pipeline(&self, pipeline: &mut Pipeline, item: &Item)
pub async fn add_item<C: AsyncCommands>( &self, db: &mut C, item: &Item ) -> RedisResult<()>
pub fn queue_len<'a, C: AsyncCommands>( &'a self, db: &'a mut C ) -> impl Future<Output = RedisResult<usize>> + 'a
pub fn processing<'a, C: AsyncCommands>( &'a self, db: &'a mut C ) -> impl Future<Output = RedisResult<usize>> + 'a
pub async fn lease<C: AsyncCommands>( &self, db: &mut C, timeout: Option<Duration>, lease_duration: Duration ) -> RedisResult<Option<Item>>
pub async fn complete<C: AsyncCommands>( &self, db: &mut C, item: &Item ) -> RedisResult<bool>
Auto Trait Implementations§
impl Freeze for WorkQueue
impl RefUnwindSafe for WorkQueue
impl Send for WorkQueue
impl Sync for WorkQueue
impl Unpin for WorkQueue
impl UnwindSafe for WorkQueue
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