Trait MailboxServer

Source
pub trait MailboxServer:
    MailboxSender
    + Clone
    + Sized
    + 'static {
    // Provided method
    fn serve(
        self,
        rx: impl Rx<MessageEnvelope> + Send + 'static,
    ) -> MailboxServerHandle  { ... }
}
Expand description

Serve a port on the provided channel::Rx. This dispatches all channel messages directly to the port.

Provided Methods§

Source

fn serve( self, rx: impl Rx<MessageEnvelope> + Send + 'static, ) -> MailboxServerHandle

Serve the provided port on the given channel on this sender on a background task which may be joined with the returned handle. The task fails on any send error.

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<T: MailboxSender + Clone + Sized + Sync + Send + 'static> MailboxServer for T