Skip to main content

Connection

Trait Connection 

Source
pub trait Connection {
    // Required methods
    fn send(&mut self, msg: ClientMsg);
    fn try_recv(&mut self) -> Option<ServerMsg>;
}
Expand description

A client’s link to an engine, in-process or over a WebSocket. Never blocks.

Required Methods§

Source

fn send(&mut self, msg: ClientMsg)

Source

fn try_recv(&mut self) -> Option<ServerMsg>

Next pending message, if any. Called every UI frame.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§