pub trait GenericQueueManagerwhere
    Self: Debug + Sync + Send,
{
Show 15 methods fn init(config: Arc<Config>) -> Result<Arc<Self>>
    where
        Self: Sized
; fn get_config(&self) -> &Config; fn write_ctx<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID,
        ctx: &'life2 ContextFinished
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn write_msg<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        msg_uuid: &'life1 Uuid,
        msg: &'life2 MessageBody
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn remove_ctx<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID,
        msg_uuid: &'life2 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn remove_msg<'life0, 'life1, 'async_trait>(
        &'life0 self,
        msg_uuid: &'life1 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn list<'life0, 'life1, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<String>>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn get_ctx<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID,
        msg_uuid: &'life2 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<ContextFinished>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn get_detailed_ctx<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID,
        msg_uuid: &'life2 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<DetailedMailContext>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn get_msg<'life0, 'life1, 'async_trait>(
        &'life0 self,
        msg_uuid: &'life1 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<MessageBody>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn write_both<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID,
        ctx: &'life2 ContextFinished,
        msg: &'life3 MessageBody
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: Sized,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: Sync + 'async_trait
, { ... } fn remove_both<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID,
        msg_uuid: &'life2 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: Sized,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: Sync + 'async_trait
, { ... } fn get_both<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        queue: &'life1 QueueID,
        msg_uuid: &'life2 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<(ContextFinished, MessageBody)>> + Send + 'async_trait>>
    where
        Self: Sized,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: Sync + 'async_trait
, { ... } fn move_to_from_id<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        before: &'life1 QueueID,
        after: &'life2 QueueID,
        msg_uuid: &'life3 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: Sized,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: Sync + 'async_trait
, { ... } fn move_to<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        before: &'life1 QueueID,
        after: &'life2 QueueID,
        ctx: &'life3 ContextFinished
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: Sized,
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
}
Expand description

CRUD operation for mail in queues.

Required Methods§

This method is called to initialize the queue manager.

All the method of GenericQueueManager take &self meaning that you should wrap the mutable inner state in a Mutex or RwLock.

The configuration must be stored and accessible using GenericQueueManager::get_config().

Get the list of message IDs in the queue.

Provided Methods§

Implementors§