Enum viz_core::types::WebSocketError
source · pub enum WebSocketError {
MissingConnectUpgrade,
InvalidConnectUpgrade,
MissingUpgrade,
InvalidUpgrade,
MissingWebSocketVersion,
InvalidWebSocketVersion,
MissingWebSocketKey,
ConnectionNotUpgradable,
TungsteniteError(Error),
}
Available on crate feature
websocket
only.Expand description
Rejects with an error when WebSocket
extraction fails.
Variants§
MissingConnectUpgrade
Missing Connection
upgrade header.
InvalidConnectUpgrade
Invalid Connection
upgrade header.
MissingUpgrade
Missing Upgrade
header.
InvalidUpgrade
Invalid Upgrade
header.
MissingWebSocketVersion
Missing Sec-WebSocket-Version
header.
InvalidWebSocketVersion
Invalid Sec-WebSocket-Version
header.
MissingWebSocketKey
Missing Sec-WebSocket-Key
header.
ConnectionNotUpgradable
Request upgrade required.
TungsteniteError(Error)
Transparents tokio_tungstenite::tungstenite::Error
.
Trait Implementations§
source§impl Debug for WebSocketError
impl Debug for WebSocketError
source§impl Display for WebSocketError
impl Display for WebSocketError
source§impl Error for WebSocketError
impl Error for WebSocketError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for WebSocketError
impl From<Error> for WebSocketError
source§impl From<WebSocketError> for Error
impl From<WebSocketError> for Error
source§fn from(e: WebSocketError) -> Self
fn from(e: WebSocketError) -> Self
Converts to this type from the input type.
source§impl IntoResponse for WebSocketError
impl IntoResponse for WebSocketError
source§fn into_response(self) -> Response
fn into_response(self) -> Response
Convert self to HTTP
Response
.source§fn into_error(self) -> Error
fn into_error(self) -> Error
Convert self to the
Error
.Auto Trait Implementations§
impl !Freeze for WebSocketError
impl !RefUnwindSafe for WebSocketError
impl Send for WebSocketError
impl Sync for WebSocketError
impl Unpin for WebSocketError
impl !UnwindSafe for WebSocketError
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