pub trait MessageSend {
// Required methods
async fn send_message<M>(
&mut self,
request: SendRequest<M>,
) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync;
async fn send_message_batch<M>(
&mut self,
request: BatchSendRequest<M>,
) -> ClientResult<SendResult>
where M: MessageTrait + Send + Sync;
async fn send_message_with_callback<M>(
&mut self,
request: SendCallbackRequest<M>,
) -> ClientResult<()>
where M: MessageTrait + Send + Sync;
async fn send_selected<M, S, T>(
&mut self,
request: SelectedSendRequest<M, S, T>,
) -> ClientResult<Option<SendResult>>
where M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static;
async fn send_selected_with_callback<M, S, T>(
&mut self,
request: SelectedSendCallbackRequest<M, S, T>,
) -> ClientResult<()>
where M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static;
async fn send_message_batch_with_callback<M>(
&mut self,
request: BatchSendCallbackRequest<M>,
) -> ClientResult<()>
where M: MessageTrait + Send + Sync;
}Expand description
Normal send, batch-send, and one-way capability.
Required Methods§
Sourceasync fn send_message<M>(
&mut self,
request: SendRequest<M>,
) -> ClientResult<Option<SendResult>>
async fn send_message<M>( &mut self, request: SendRequest<M>, ) -> ClientResult<Option<SendResult>>
Sends one message using a closed request contract.
§Errors
Preserves the error returned by the corresponding legacy operation.
Sourceasync fn send_message_batch<M>(
&mut self,
request: BatchSendRequest<M>,
) -> ClientResult<SendResult>
async fn send_message_batch<M>( &mut self, request: BatchSendRequest<M>, ) -> ClientResult<SendResult>
Sends a batch using a closed request contract.
§Errors
Preserves the error returned by the corresponding legacy operation.
Sourceasync fn send_message_with_callback<M>(
&mut self,
request: SendCallbackRequest<M>,
) -> ClientResult<()>
async fn send_message_with_callback<M>( &mut self, request: SendCallbackRequest<M>, ) -> ClientResult<()>
Sends one message and reports completion through the supplied callback.
§Errors
Preserves the corresponding legacy validation and submission errors.
Sourceasync fn send_selected<M, S, T>(
&mut self,
request: SelectedSendRequest<M, S, T>,
) -> ClientResult<Option<SendResult>>where
M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static,
async fn send_selected<M, S, T>(
&mut self,
request: SelectedSendRequest<M, S, T>,
) -> ClientResult<Option<SendResult>>where
M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static,
Sends one message using a queue selector.
§Errors
Preserves selector, routing, and send errors from the legacy operation.
Sourceasync fn send_selected_with_callback<M, S, T>(
&mut self,
request: SelectedSendCallbackRequest<M, S, T>,
) -> ClientResult<()>where
M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static,
async fn send_selected_with_callback<M, S, T>(
&mut self,
request: SelectedSendCallbackRequest<M, S, T>,
) -> ClientResult<()>where
M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static,
Sends one selected message and reports completion through a callback.
§Errors
Preserves selector, routing, and submission errors.
Sourceasync fn send_message_batch_with_callback<M>(
&mut self,
request: BatchSendCallbackRequest<M>,
) -> ClientResult<()>
async fn send_message_batch_with_callback<M>( &mut self, request: BatchSendCallbackRequest<M>, ) -> ClientResult<()>
Sends a batch and reports completion through a callback.
§Errors
Preserves the corresponding legacy validation and submission errors.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".