Trait Reply

Source
pub trait Reply: Send + Sync {
    type Data;

    // Required methods
    fn send(&self, data: Self::Data) -> Result<()>;
    fn clone_reply(&self) -> Box<dyn Reply<Data = Self::Data>>;
}
Expand description

Interface to send a reply to some request

Required Associated Types§

Required Methods§

Source

fn send(&self, data: Self::Data) -> Result<()>

Sends a reply out from the server.

Source

fn clone_reply(&self) -> Box<dyn Reply<Data = Self::Data>>

Clones this reply.

Implementations on Foreign Types§

Source§

impl<T: Send + 'static> Reply for UnboundedSender<T>

Source§

type Data = T

Source§

fn send(&self, data: Self::Data) -> Result<()>

Source§

fn clone_reply(&self) -> Box<dyn Reply<Data = Self::Data>>

Implementors§

Source§

impl<T: Send + 'static> Reply for QueuedServerReply<T>

Source§

type Data = T

Source§

impl<T: Send + 'static> Reply for ServerReply<T>

Source§

type Data = T