pub struct MemoryProducerBackend { /* private fields */ }Expand description
内存生产者后端
Implementations§
Source§impl MemoryProducerBackend
impl MemoryProducerBackend
Sourcepub fn new(config: ProducerConfig, manager: Arc<MemoryQueueManager>) -> Self
pub fn new(config: ProducerConfig, manager: Arc<MemoryQueueManager>) -> Self
创建新的内存生产者后端
Trait Implementations§
Source§impl ProducerBackend for MemoryProducerBackend
impl ProducerBackend for MemoryProducerBackend
Source§fn send_raw<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
message: &'life2 RawMessage,
) -> Pin<Box<dyn Future<Output = WaeResult<MessageId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_raw<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
message: &'life2 RawMessage,
) -> Pin<Box<dyn Future<Output = WaeResult<MessageId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
发送原始消息到指定队列
Source§fn send_raw_default<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 RawMessage,
) -> Pin<Box<dyn Future<Output = WaeResult<MessageId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_raw_default<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 RawMessage,
) -> Pin<Box<dyn Future<Output = WaeResult<MessageId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
发送原始消息到默认队列
Source§fn send_raw_delayed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
message: &'life2 RawMessage,
delay: Duration,
) -> Pin<Box<dyn Future<Output = WaeResult<MessageId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_raw_delayed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
message: &'life2 RawMessage,
delay: Duration,
) -> Pin<Box<dyn Future<Output = WaeResult<MessageId>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
发送延迟消息
Source§fn send_raw_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
messages: &'life2 [RawMessage],
) -> Pin<Box<dyn Future<Output = WaeResult<Vec<MessageId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_raw_batch<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
queue: &'life1 str,
messages: &'life2 [RawMessage],
) -> Pin<Box<dyn Future<Output = WaeResult<Vec<MessageId>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
批量发送消息
Source§fn config(&self) -> &ProducerConfig
fn config(&self) -> &ProducerConfig
获取生产者配置
Auto Trait Implementations§
impl Freeze for MemoryProducerBackend
impl !RefUnwindSafe for MemoryProducerBackend
impl Send for MemoryProducerBackend
impl Sync for MemoryProducerBackend
impl Unpin for MemoryProducerBackend
impl UnsafeUnpin for MemoryProducerBackend
impl !UnwindSafe for MemoryProducerBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more