pub enum WispError {
Show 17 variants
PacketTooSmall,
InvalidPacketType,
InvalidStreamType,
InvalidStreamId,
InvalidCloseReason,
InvalidUri,
UriHasNoHost,
UriHasNoPort,
MaxStreamCountReached,
StreamAlreadyClosed,
WsFrameInvalidType,
WsFrameNotFinished,
WsImplError(Box<dyn Error + Sync + Send>),
WsImplSocketClosed,
WsImplNotSupported,
Utf8Error(Utf8Error),
Other(Box<dyn Error + Sync + Send>),
}
Expand description
Errors the Wisp implementation can return.
Variants§
PacketTooSmall
The packet recieved did not have enough data.
InvalidPacketType
The packet recieved had an invalid type.
InvalidStreamType
The stream had an invalid type.
InvalidStreamId
The stream had an invalid ID.
InvalidCloseReason
The close packet had an invalid reason.
InvalidUri
The URI recieved was invalid.
UriHasNoHost
The URI recieved had no host.
UriHasNoPort
The URI recieved had no port.
MaxStreamCountReached
The max stream count was reached.
StreamAlreadyClosed
The stream had already been closed.
WsFrameInvalidType
The websocket frame recieved had an invalid type.
WsFrameNotFinished
The websocket frame recieved was not finished.
WsImplError(Box<dyn Error + Sync + Send>)
Error specific to the websocket implementation.
WsImplSocketClosed
The websocket implementation socket closed.
WsImplNotSupported
The websocket implementation did not support the action.
Utf8Error(Utf8Error)
The string was invalid UTF-8.
Other(Box<dyn Error + Sync + Send>)
Other error.
Trait Implementations§
source§impl Error for WispError
impl Error for WispError
1.30.0 · 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()
Auto Trait Implementations§
impl !RefUnwindSafe for WispError
impl Send for WispError
impl Sync for WispError
impl Unpin for WispError
impl !UnwindSafe for WispError
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