cross-ws 0.3.3

cross-ws is a web and native stream based WebSocket client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Message module.

use crate::prelude::*;

/// An enum representing the various forms of a WebSocket message.
#[derive(Debug, Eq, PartialEq, Clone, EnumAsInner)]
pub enum Message {
    /// A text WebSocket message.
    Text(String),
    /// A binary WebSocket message.
    Binary(Vec<u8>),
    /// Message sent when the connection is closed.
    Close(Option<(u16, String)>)
}