Trait WebsocketClient

Source
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§

Source

fn connect(&self) -> bool

Source

fn reconnect(&mut self) -> bool

Source

fn message<S: Into<String>>(&self, id: S) -> Message

Source

fn is_connected(&self) -> bool

Source

fn close(&self) -> bool

Source

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.

Implementors§