pub enum CloseCode {
Normal,
GoingAway,
Protocol,
Unsupported,
NoStatus,
InvalidPayload,
PolicyViolation,
MessageTooBig,
MandatoryExtension,
InternalError,
Other(u16),
}Expand description
WebSocket close status codes (RFC 6455 §7.4.1).
Variants§
Normal
1000 — normal closure.
GoingAway
1001 — endpoint going away.
Protocol
1002 — protocol error.
Unsupported
1003 — received unsupported data type.
NoStatus
1005 — no status code present.
InvalidPayload
1007 — payload data not consistent with message type.
PolicyViolation
1008 — policy violation.
MessageTooBig
1009 — message too big.
MandatoryExtension
1010 — client expected server to negotiate an extension.
InternalError
1011 — server encountered an unexpected condition.
Other(u16)
Application-defined code (3000-4999).
Implementations§
Trait Implementations§
impl Copy for CloseCode
impl Eq for CloseCode
impl StructuralPartialEq for CloseCode
Auto Trait Implementations§
impl Freeze for CloseCode
impl RefUnwindSafe for CloseCode
impl Send for CloseCode
impl Sync for CloseCode
impl Unpin for CloseCode
impl UnsafeUnpin for CloseCode
impl UnwindSafe for CloseCode
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