Trait distant_net::Reply
source · [−]pub trait Reply: Send + Sync {
type Data;
fn send(
&self,
data: Self::Data
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>>;
fn blocking_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
Sends a reply out from the server
sourcefn blocking_send(&self, data: Self::Data) -> Result<()>
fn blocking_send(&self, data: Self::Data) -> Result<()>
Blocking version of sending a reply out from the server
sourcefn clone_reply(&self) -> Box<dyn Reply<Data = Self::Data>>
fn clone_reply(&self) -> Box<dyn Reply<Data = Self::Data>>
Clones this reply