pub struct CloseEvent {
pub code: u16,
pub reason: String,
pub was_clean: bool,
}Available on crate feature
websocket only.Expand description
Data emitted by onclose event
Fields§
§code: u16Close code
reason: StringClose reason
was_clean: boolIf the websockets was closed cleanly
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 (const: unstable) · 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
impl Eq for CloseEvent
Source§impl Hash for CloseEvent
impl Hash for CloseEvent
Source§impl PartialEq for CloseEvent
impl PartialEq for CloseEvent
Source§fn eq(&self, other: &CloseEvent) -> bool
fn eq(&self, other: &CloseEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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