pub struct ClosedReason {
pub code: CloseCode,
pub reason: String,
pub was_clean: bool,
}
Expand description
Reason for why a WebSocket connection is closed.
Fields§
§code: CloseCode
A number representing the closing code.
reason: String
A string representing a human-readable description of the reason why the socket connection was closed.
was_clean: bool
Indicates whether or not the connection was cleanly closed
Trait Implementations§
Source§impl Clone for ClosedReason
impl Clone for ClosedReason
Source§fn clone(&self) -> ClosedReason
fn clone(&self) -> ClosedReason
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ClosedReason
impl Debug for ClosedReason
Auto Trait Implementations§
impl Freeze for ClosedReason
impl RefUnwindSafe for ClosedReason
impl Send for ClosedReason
impl Sync for ClosedReason
impl Unpin for ClosedReason
impl UnwindSafe for ClosedReason
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