Trait InputQueue

Source
pub trait InputQueue {
    type Handle: JobHandle<Err = Self::Err>;
    type Err: Debug;
    type Stream: Stream<Item = Result<JobResult<Self::Handle>, Self::Err>> + Unpin;

    // Required methods
    fn get<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<JobResult<Self::Handle>, Self::Err>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn into_stream<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Self::Stream> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

The receive-only side of a queue

Required Associated Types§

Source

type Handle: JobHandle<Err = Self::Err>

The type of handle used to ack/nack items received from this queue

Source

type Err: Debug

The type of error that can occur while getting an item from this queue

Source

type Stream: Stream<Item = Result<JobResult<Self::Handle>, Self::Err>> + Unpin

The type of Stream that this InputQueue produces

Required Methods§

Source

fn get<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<JobResult<Self::Handle>, Self::Err>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receive a message from this InputQueue

Source

fn into_stream<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Self::Stream> + Send + 'async_trait>>
where Self: 'async_trait,

Convert this InputQueue into a Stream

Implementors§