pub enum TapError {
Show 13 variants
ConnectionFailed(String),
ConnectionClosed,
MaxReconnectAttemptsExceeded(u32),
AuthenticationFailed(String),
ParseError(String),
AckFailed(String),
HttpError(String),
HttpResponseError {
status: u16,
message: String,
},
InvalidUrl(String),
IoError(Error),
JsonError(Error),
StreamClosed,
Timeout,
}Expand description
Errors that can occur during TAP operations.
Variants§
ConnectionFailed(String)
WebSocket connection failed.
ConnectionClosed
Connection was closed unexpectedly.
MaxReconnectAttemptsExceeded(u32)
Maximum reconnection attempts exceeded.
AuthenticationFailed(String)
Authentication failed.
ParseError(String)
Failed to parse a message from the server.
AckFailed(String)
Failed to send an acknowledgment.
HttpError(String)
HTTP request failed.
HttpResponseError
HTTP response indicated an error.
InvalidUrl(String)
Invalid URL.
IoError(Error)
I/O error.
JsonError(Error)
JSON serialization/deserialization error.
StreamClosed
Stream has been closed and cannot be used.
Timeout
Operation timed out.
Implementations§
Source§impl TapError
impl TapError
Sourcepub fn is_connection_error(&self) -> bool
pub fn is_connection_error(&self) -> bool
Returns true if this error indicates a connection issue that may be recoverable.
Sourcepub fn is_parse_error(&self) -> bool
pub fn is_parse_error(&self) -> bool
Returns true if this error is a parse error that doesn’t affect connection state.
Trait Implementations§
Source§impl Error for TapError
impl Error for TapError
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()
Auto Trait Implementations§
impl Freeze for TapError
impl !RefUnwindSafe for TapError
impl Send for TapError
impl Sync for TapError
impl Unpin for TapError
impl UnsafeUnpin for TapError
impl !UnwindSafe for TapError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.