pub enum WsState {
Connecting,
Open,
Closing,
Closed,
}
Expand description
Indicates the state of a Websocket connection. The only state in which it’s valid to send and receive messages is WsState::Open.
See MDN for the ready state values.
Variants§
Trait Implementations§
Source§impl TryFrom<u16> for WsState
Internally ready state is a u16, so it’s possible to create one from a u16. Only 0-3 are valid values.
impl TryFrom<u16> for WsState
Internally ready state is a u16, so it’s possible to create one from a u16. Only 0-3 are valid values.
See MDN for the ready state values.
impl Copy for WsState
impl Eq for WsState
impl StructuralPartialEq for WsState
Auto Trait Implementations§
impl Freeze for WsState
impl RefUnwindSafe for WsState
impl Send for WsState
impl Sync for WsState
impl Unpin for WsState
impl UnwindSafe for WsState
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