1
2
3
4
5
6
7
8
9
10
11
12
//! WebSocket Events

/// Data emitted by `onclose` event
#[derive(Clone, Debug)]
pub struct CloseEvent {
    /// Close code
    pub code: u16,
    /// Close reason
    pub reason: String,
    /// If the websockets was closed cleanly
    pub was_clean: bool,
}