pub trait MessageResponse {
    type Sender;
    type Output;

    // Required method
    fn channel() -> (Self::Sender, Self::Output);
}
Expand description

Response behavior of an Interface message.

It defines how a service handles and responds to interface messages, such as through asynchronous responses or fire-and-forget without responding. FromMessage implementations declare this behavior on the interface.

See FromMessage for more information on how to use this trait.

Required Associated Types§

source

type Sender

Sends responses from the service back to the waiting recipient.

source

type Output

The type returned from Addr::send.

This type can be either synchronous and asynchronous based on the responder.

Required Methods§

source

fn channel() -> (Self::Sender, Self::Output)

Returns the response channel for an interface message.

Object Safety§

This trait is not object safe.

Implementors§