pub enum WsEvent {
Connected {
url: String,
},
Disconnected {
url: String,
code: u16,
reason: String,
will_reconnect: bool,
},
Message {
message: WsMessage,
channel: Option<String>,
},
Reconnecting {
url: String,
attempt: u32,
backoff_ms: u64,
},
Error {
description: String,
},
PingRtt {
millis: f64,
},
}Variants§
Connected
Successfully connected and handshaked.
Disconnected
Connection closed by server or error.
Message
Received a message from the server.
Reconnecting
Reconnect attempt starting.
Error
Error during connection or message.
PingRtt
Ping round-trip time measured.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WsEvent
impl RefUnwindSafe for WsEvent
impl Send for WsEvent
impl Sync for WsEvent
impl Unpin for WsEvent
impl UnsafeUnpin for WsEvent
impl UnwindSafe for WsEvent
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