pub trait MeshTransport {
// Required methods
fn broadcast(&mut self, data: &[u8]);
fn poll(&mut self) -> Vec<(PeerId, Vec<u8>)>;
fn events(&mut self) -> Vec<MeshEvent>;
}Expand description
The transport seam: how the coordinator actually moves bytes between peers. The real implementation is WebRTC data channels (a feature-gated binding); tests use an in-memory loopback. Keeping this a trait is what makes the mesh logic testable with no network and swappable across transports.
Required Methods§
Sourcefn broadcast(&mut self, data: &[u8])
fn broadcast(&mut self, data: &[u8])
Send data to every connected peer (unreliable/unordered is fine for poses).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".