Skip to main content

RemoteHandle

Trait RemoteHandle 

Source
pub trait RemoteHandle:
    Send
    + Sync
    + 'static {
    // Required methods
    fn send(&self, recipient: Addr, envelope: Envelope) -> SendResult;
    fn try_send(
        &self,
        recipient: Addr,
        envelope: Envelope,
    ) -> Result<(), TrySendError<Envelope>>;
    fn unbounded_send(
        &self,
        recipient: Addr,
        envelope: Envelope,
    ) -> Result<(), SendError<Envelope>>;
    fn respond(
        &self,
        token: ResponseToken,
        response: Result<Envelope, RequestError>,
    );
}
Available on crate feature unstable only.
Expand description

§Stability

This API is marked as unstable and is only available when the unstable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Required Methods§

Source

fn send(&self, recipient: Addr, envelope: Envelope) -> SendResult

Source

fn try_send( &self, recipient: Addr, envelope: Envelope, ) -> Result<(), TrySendError<Envelope>>

Source

fn unbounded_send( &self, recipient: Addr, envelope: Envelope, ) -> Result<(), SendError<Envelope>>

Source

fn respond( &self, token: ResponseToken, response: Result<Envelope, RequestError>, )

Implementors§