pub trait DMSCQueue: Send + Sync {
// Required methods
fn create_producer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueProducer>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_consumer<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueConsumer>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCQueueStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn purge<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Main queue trait defining queue operations.
This trait defines the core operations for queues, including creating producers and consumers, getting statistics, purging queues, and deleting queues.
Required Methods§
Sourcefn create_producer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueProducer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_producer<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueProducer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a new producer for this queue.
§Returns
A DMSCResult<Box<dyn DMSCQueueProducer>> containing the producer
Sourcefn create_consumer<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueConsumer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_consumer<'life0, 'life1, 'async_trait>(
&'life0 self,
consumer_group: &'life1 str,
) -> Pin<Box<dyn Future<Output = DMSCResult<Box<dyn DMSCQueueConsumer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCQueueStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = DMSCResult<DMSCQueueStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets statistics for this queue.
§Returns
A DMSCResult<DMSCQueueStats> containing the queue statistics