pub trait GenericQueueManagerwhere
    Self: Debug + Sync + Send,{
Show 16 methods // Required methods fn init( config: Arc<Config>, transport_deserializer: Vec<DeserializerFn> ) -> Result<Arc<Self>> where Self: Sized; fn get_config(&self) -> &Config; fn get_transport_deserializer(&self) -> &[DeserializerFn]; 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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods 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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... }
}
Expand description

CRUD operation for mail in queues.

Required Methods§

fn init( config: Arc<Config>, transport_deserializer: Vec<DeserializerFn> ) -> Result<Arc<Self>>where Self: Sized,

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().

fn get_config(&self) -> &Config

fn get_transport_deserializer(&self) -> &[DeserializerFn]

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the list of message IDs in the queue.

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: '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 + Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§