Skip to main content

WorkQueue

Trait WorkQueue 

Source
pub trait WorkQueue: Send + Sync {
    // Required methods
    fn claim<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = BusResult<ClaimOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ack<'life0, 'async_trait>(
        &'life0 self,
        token: DeliveryToken,
    ) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn nak<'life0, 'async_trait>(
        &'life0 self,
        token: DeliveryToken,
        delay: Duration,
    ) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn term<'life0, 'async_trait>(
        &'life0 self,
        token: DeliveryToken,
    ) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A claimant on a bounded work queue.

ack, nak and term return Ok only once the server has recorded the decision, so a claimant may exit straight after one without losing it.

Required Methods§

Source

fn claim<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = BusResult<ClaimOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ack<'life0, 'async_trait>( &'life0 self, token: DeliveryToken, ) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn nak<'life0, 'async_trait>( &'life0 self, token: DeliveryToken, delay: Duration, ) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn term<'life0, 'async_trait>( &'life0 self, token: DeliveryToken, ) -> Pin<Box<dyn Future<Output = BusResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§