pub enum ProtocolError {
Show 17 variants
UnsupportedVersion,
InvalidUpgradeRequest,
MissingHeader(String),
InvalidHeader {
header: String,
value: String,
},
ExtensionNegotiation(String),
SubprotocolNegotiation,
InvalidFrame(String),
FragmentedControlFrame,
InvalidCloseCode(u16),
ReservedBitsSet,
InvalidMethod(String),
InvalidFormat(String),
InvalidHeaderValue {
header: String,
value: String,
},
InvalidOrigin {
expected: String,
received: String,
},
UnsupportedProtocol(String),
UnexpectedStatus(u16),
InvalidAcceptKey {
expected: String,
received: String,
},
}Expand description
WebSocket protocol specific errors
Variants§
UnsupportedVersion
Invalid WebSocket version
InvalidUpgradeRequest
Invalid upgrade request
MissingHeader(String)
Missing required headers
InvalidHeader
Invalid header value
ExtensionNegotiation(String)
Extension negotiation failed
SubprotocolNegotiation
Subprotocol negotiation failed
InvalidFrame(String)
Invalid frame format
FragmentedControlFrame
Control frame fragmentation not allowed
InvalidCloseCode(u16)
Invalid close code
ReservedBitsSet
Reserved bits set in frame
InvalidMethod(String)
Invalid HTTP method
InvalidFormat(String)
Invalid format
InvalidHeaderValue
Invalid header value
InvalidOrigin
Invalid origin
UnsupportedProtocol(String)
Unsupported protocol
UnexpectedStatus(u16)
Unexpected HTTP status
InvalidAcceptKey
Invalid accept key
Trait Implementations§
Source§impl Clone for ProtocolError
impl Clone for ProtocolError
Source§fn clone(&self) -> ProtocolError
fn clone(&self) -> ProtocolError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtocolError
impl Debug for ProtocolError
Source§impl Display for ProtocolError
impl Display for ProtocolError
Source§impl Error for ProtocolError
impl Error for ProtocolError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ProtocolError
impl RefUnwindSafe for ProtocolError
impl Send for ProtocolError
impl Sync for ProtocolError
impl Unpin for ProtocolError
impl UnwindSafe for ProtocolError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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