pub trait WebsocketClient {
// Required methods
fn connect(&self) -> bool;
fn reconnect(&mut self) -> bool;
fn message<S: Into<String>>(&self, id: S) -> Message;
fn is_connected(&self) -> bool;
fn close(&self) -> bool;
fn send(&self, msg: Message) -> bool;
}
Required Methods§
fn connect(&self) -> bool
fn reconnect(&mut self) -> bool
fn message<S: Into<String>>(&self, id: S) -> Message
fn is_connected(&self) -> bool
fn close(&self) -> bool
fn send(&self, msg: Message) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.