pub trait Transport {
// Required methods
fn send(&mut self, batch: Vec<u8>) -> Result<(), WireError>;
fn recv(&mut self) -> Result<Option<Vec<u8>>, WireError>;
}Expand description
What carries one side’s batches to the other: a queue in one process, a socket and ring
between processes, postMessage between a page and a worker. At most one batch a frame.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".