Skip to main content

Transport

Trait Transport 

Source
pub trait Transport:
    Debug
    + Send
    + Sync {
    // Required method
    fn channel<T: Send + 'static>(&self) -> (Outbox<T>, Mailbox<T>);
}
Expand description

Creates the two ends of a one-way message channel.

Required Methods§

Source

fn channel<T: Send + 'static>(&self) -> (Outbox<T>, Mailbox<T>)

Pairs a producer with a consumer.

The channel is unbounded, matching the queues it replaces: backpressure would change the caller’s timing, and a transport that needs it has to apply it inside the message type instead.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§