pub trait SubsystemSender<OutgoingMessage>: 'static + Clone + Sendwhere
    OutgoingMessage: Send,
{ fn send_message<'life0, 'async_trait>(
        &'life0 mut self,
        msg: OutgoingMessage
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn send_messages<'life0, 'async_trait, I>(
        &'life0 mut self,
        msgs: I
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        I: IntoIterator<Item = OutgoingMessage> + Send + 'async_trait,
        <I as IntoIterator>::IntoIter: Send,
        Self: 'async_trait
; fn send_unbounded_message(&mut self, msg: OutgoingMessage); }
Expand description

Sender end of a channel to interface with a subsystem.

Required Methods§

Send a direct message to some other Subsystem, routed based on message type.

Send multiple direct messages to other Subsystems, routed based on message type.

Send a message onto the unbounded queue of some other Subsystem, routed based on message type.

This function should be used only when there is some other bounding factor on the messages sent with it. Otherwise, it risks a memory leak.

Implementors§