pub struct WebSocketClient { /* private fields */ }Implementations§
Source§impl WebSocketClient
impl WebSocketClient
pub fn new() -> Self
pub fn is_connected(&self) -> bool
pub fn connect( &mut self, url: String, session_cookie: &str, ) -> Result<(), WebSocketError>
pub fn reconnect(&mut self) -> Result<(), WebSocketError>
pub fn send<I: Serialize>(&mut self, message: I) -> Result<(), WebSocketError>
pub fn close(&mut self) -> Result<(), WebSocketError>
pub fn wait_until_closed(&mut self) -> Result<(), WebSocketError>
Trait Implementations§
Source§impl Default for WebSocketClient
impl Default for WebSocketClient
Source§fn default() -> WebSocketClient
fn default() -> WebSocketClient
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for WebSocketClient
impl RefUnwindSafe for WebSocketClient
impl Send for WebSocketClient
impl Sync for WebSocketClient
impl Unpin for WebSocketClient
impl UnwindSafe for WebSocketClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more