Skip to main content

PublishSink

Trait PublishSink 

Source
pub trait PublishSink: Send {
    // Required method
    fn send_frames<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        frames: &'life1 [&'life2 [u8]],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for sending frames on a publish/control channel.

Abstracted because native uses sync zmq::Socket::send with DONTWAIT, while WASM uses async WebTransport writes.

Required Methods§

Source

fn send_frames<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, frames: &'life1 [&'life2 [u8]], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Send ZMTP multipart frames (e.g., [ctrl_topic, capnp, mac]).

Implementors§