pub trait RequestReply {
// Required methods
async fn request_reply<M>(
&mut self,
request: RequestReplyRequest<M>,
) -> ClientResult<Box<dyn MessageTrait + Send>>
where M: MessageTrait + Send + Sync;
async fn request_reply_with_callback<M>(
&mut self,
request: RequestReplyCallbackRequest<M>,
) -> ClientResult<()>
where M: MessageTrait + Send + Sync;
async fn request_reply_selected<M, S, T>(
&mut self,
request: SelectedRequestReplyRequest<M, S, T>,
) -> ClientResult<Box<dyn MessageTrait + Send>>
where M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static;
async fn request_reply_selected_with_callback<M, S, T>(
&mut self,
request: SelectedRequestReplyCallbackRequest<M, S, T>,
) -> ClientResult<()>
where M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static;
}Expand description
Request/reply capability.
Required Methods§
Sourceasync fn request_reply<M>(
&mut self,
request: RequestReplyRequest<M>,
) -> ClientResult<Box<dyn MessageTrait + Send>>
async fn request_reply<M>( &mut self, request: RequestReplyRequest<M>, ) -> ClientResult<Box<dyn MessageTrait + Send>>
Sends a request and waits for its correlated reply.
§Errors
Preserves the existing timeout, routing, and remoting errors.
Sourceasync fn request_reply_with_callback<M>(
&mut self,
request: RequestReplyCallbackRequest<M>,
) -> ClientResult<()>
async fn request_reply_with_callback<M>( &mut self, request: RequestReplyCallbackRequest<M>, ) -> ClientResult<()>
Sends a request and reports its correlated reply through a callback.
§Errors
Preserves timeout, routing, and submission errors.
Sourceasync fn request_reply_selected<M, S, T>(
&mut self,
request: SelectedRequestReplyRequest<M, S, T>,
) -> ClientResult<Box<dyn MessageTrait + Send>>where
M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static,
async fn request_reply_selected<M, S, T>(
&mut self,
request: SelectedRequestReplyRequest<M, S, T>,
) -> ClientResult<Box<dyn MessageTrait + Send>>where
M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static,
Sends a selector-routed request and waits for its reply.
§Errors
Preserves selector, timeout, routing, and remoting errors.
Sourceasync fn request_reply_selected_with_callback<M, S, T>(
&mut self,
request: SelectedRequestReplyCallbackRequest<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 request_reply_selected_with_callback<M, S, T>(
&mut self,
request: SelectedRequestReplyCallbackRequest<M, S, T>,
) -> ClientResult<()>where
M: MessageTrait + Send + Sync,
S: Fn(&[MessageQueue], &M, &T) -> Option<MessageQueue> + Send + Sync + 'static,
T: Send + Sync + 'static,
Sends a selector-routed request and reports its reply through a callback.
§Errors
Preserves selector, timeout, routing, and submission errors.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".