pub struct SMError {
pub kind: SMErrorKind,
/* private fields */
}
Expand description
WebSocket state machine errors
Fields§
§kind: SMErrorKind
Implementations§
source§impl SMError
impl SMError
pub fn close_code(&self) -> CloseCode
pub fn invalid_message(description: String) -> Self
Trait Implementations§
source§impl Error for SMError
impl Error for SMError
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 ReportableError for SMError
impl ReportableError for SMError
source§fn reportable_source(&self) -> Option<&(dyn ReportableError + 'static)>
fn reportable_source(&self) -> Option<&(dyn ReportableError + 'static)>
Like [Error::source] but returns the source (if any) of this error as a
ReportableError if it implements the trait. Otherwise callers of this
method will likely subsequently call [Error::source] to return the
source (if any) as the parent [Error] trait.
source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Return a
Backtrace
for this Error if one was capturedsource§fn is_sentry_event(&self) -> bool
fn is_sentry_event(&self) -> bool
Whether this error is reported to Sentry
source§fn metric_label(&self) -> Option<&'static str>
fn metric_label(&self) -> Option<&'static str>
Errors that don’t emit Sentry events (!is_sentry_event()) emit an
increment metric instead with this label
Experimental: return tag key value pairs for metrics and Sentry
Auto Trait Implementations§
impl Freeze for SMError
impl !RefUnwindSafe for SMError
impl Send for SMError
impl Sync for SMError
impl Unpin for SMError
impl !UnwindSafe for SMError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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