pub enum Reason {
Local,
Peer(u8),
Timeout,
ConnectTimeout,
Full,
Protocol,
RateLimit,
Closed(u16),
Replaced,
ServerKey,
}Expand description
why a connection ended
Variants§
Local
this side ended it
Peer(u8)
the peer sent DISCONNECT with this code (packet::BYE_*)
Timeout
nothing came for timeout_ms
ConnectTimeout
the handshake did not finish within connect_ms
Full
the server refused: it is full (or the address has max_per_ip connections)
Protocol
the server speaks another protocol id
RateLimit
the peer broke the rate limits (the server ended it)
Closed(u16)
the WebSocket under it closed with this code (1006: without a close frame)
Replaced
the same address made a new handshake
ServerKey
the server did not prove the static key of ClientConfig::server_key: it has none (DENY), or its ACCEPT did not check (another server, or someone on the path in its place)
Trait Implementations§
impl Eq for Reason
impl StructuralPartialEq for Reason
Auto Trait Implementations§
impl Forget for Reason
impl Freeze for Reason
impl Move for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnsafeUnpin for Reason
impl UnwindSafe for Reason
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