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§
Sourcefn from_core(core: Ref<CoreWebsocketClient>) -> Self
fn from_core(core: Ref<CoreWebsocketClient>) -> Self
Called to construct this client object with the given core object.
fn connect<I>(&self, host: &str, headers: I) -> bool
fn write(&self, data: &[u8]) -> bool
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.