Trait WebsocketClient

Source
pub trait WebsocketClient: Sync + Send {
    // Required methods
    fn from_core(core: Ref<CoreWebsocketClient>) -> Self;
    fn connect<I>(&self, host: &str, headers: I) -> bool
       where I: IntoIterator<Item = (String, String)>;
    fn write(&self, data: &[u8]) -> bool;
    fn disconnect(&self) -> bool;
}

Required Methods§

Source

fn from_core(core: Ref<CoreWebsocketClient>) -> Self

Called to construct this client object with the given core object.

Source

fn connect<I>(&self, host: &str, headers: I) -> bool
where I: IntoIterator<Item = (String, String)>,

Source

fn write(&self, data: &[u8]) -> bool

Source

fn disconnect(&self) -> 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§