pub struct LiveConnError {
pub kind: LiveConnErrorKind,
pub message: String,
pub source: Option<Box<dyn Error + Send + Sync>>,
}Expand description
A failure on a live connection. message is the full error text.
Fields§
§kind: LiveConnErrorKindThe classification.
message: StringThe full error text.
source: Option<Box<dyn Error + Send + Sync>>The underlying error, if any.
Implementations§
Source§impl LiveConnError
impl LiveConnError
Sourcepub fn new(kind: LiveConnErrorKind, message: impl Into<String>) -> Self
pub fn new(kind: LiveConnErrorKind, message: impl Into<String>) -> Self
An error with no source.
Sourcepub fn with_source(
self,
source: impl Into<Box<dyn Error + Send + Sync>>,
) -> Self
pub fn with_source( self, source: impl Into<Box<dyn Error + Send + Sync>>, ) -> Self
Attaches the underlying error.
Sourcepub fn is_resumable(&self) -> bool
pub fn is_resumable(&self) -> bool
Whether the session can be resumed after this error: a lost connection, a close frame with code 1008, or text naming a dropped connection. The text rule applies to every kind, including a close frame with any other code.
Trait Implementations§
Source§impl Debug for LiveConnError
impl Debug for LiveConnError
Source§impl Display for LiveConnError
impl Display for LiveConnError
Source§impl Error for LiveConnError
impl Error for LiveConnError
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 !RefUnwindSafe for LiveConnError
impl !UnwindSafe for LiveConnError
impl Forget for LiveConnError
impl Freeze for LiveConnError
impl Move for LiveConnError
impl Send for LiveConnError
impl Sync for LiveConnError
impl Unpin for LiveConnError
impl UnsafeUnpin for LiveConnErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const dyn Error + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Error + Sync + Send>: UnsafeUnpin,
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