pub trait WebsocketClient: Sync + Send {
// Required methods
fn from_core(core: Ref<CoreWebsocketClient>) -> Self;
fn connect<I, K, V>(&self, host: &str, headers: I) -> bool
where I: IntoIterator<Item = (K, V)>,
K: BnStrCompatible,
V: BnStrCompatible;
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, K, V>(&self, host: &str, headers: I) -> bool
fn write(&self, data: &[u8]) -> bool
fn disconnect(&self) -> bool
Object Safety§
This trait is not object safe.