Skip to main content

Request

Trait Request 

Source
pub trait Request: MessageBounds {
    type Response;

    // Required method
    fn reply(&self, resp: Self::Response);
}
Expand description

A marker trait for messags that expect a response

Messages with this trait can be replied to.

Required Associated Types§

Source

type Response

The type of the response that is expected

Required Methods§

Source

fn reply(&self, resp: Self::Response)

Fulfill this request by supplying a response of the appropriate type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Req, Resp> Request for WithRecipient<Req, Resp>
where Req: MessageBounds, Resp: Debug + 'static,

Source§

type Response = Resp

Source§

impl<Req, Resp> Request for WithSender<Req, Resp>
where Req: MessageBounds, Resp: MessageBounds,

Source§

type Response = Resp

Source§

impl<Req, Resp> Request for WithSenderStrong<Req, Resp>
where Req: MessageBounds, Resp: MessageBounds,

Source§

type Response = Resp