pub trait WebSocketConnection {
// Required methods
fn send_text(&mut self, text: &str) -> Result<(), String>;
fn send_binary(&mut self, data: &[u8]) -> Result<(), String>;
fn close(&mut self, code: u16, reason: &str);
}Expand description
Uma conexão aberta por um WebSocketProvider: mandar e fechar, da thread da tela.
Required Methods§
fn send_text(&mut self, text: &str) -> Result<(), String>
fn send_binary(&mut self, data: &[u8]) -> Result<(), String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".