pub struct CloseEvent {
pub code: u16,
pub reason: String,
pub was_clean: bool,
}
Expand description
An event holding information about how/why the connection was closed.
Fields§
§code: u16
The close code. See: MDN Documentation.
reason: String
The reason why the connection was closed. See: MDN Documentation.
was_clean: bool
Whether the connection was closed cleanly. See: MDN Documentation.
Trait Implementations§
Source§impl Clone for CloseEvent
impl Clone for CloseEvent
Source§fn clone(&self) -> CloseEvent
fn clone(&self) -> CloseEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CloseEvent
impl Debug for CloseEvent
Source§impl From<CloseEvent> for CloseEvent
impl From<CloseEvent> for CloseEvent
Source§fn from(js_evt: JsCloseEvt) -> Self
fn from(js_evt: JsCloseEvt) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CloseEvent
impl PartialEq for CloseEvent
impl Eq for CloseEvent
impl StructuralPartialEq for CloseEvent
Auto Trait Implementations§
impl Freeze for CloseEvent
impl RefUnwindSafe for CloseEvent
impl Send for CloseEvent
impl Sync for CloseEvent
impl Unpin for CloseEvent
impl UnwindSafe for CloseEvent
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