nash_ws/message/mod.rs
1//! Message module.
2
3/// An enum representing the various forms of a WebSocket message.
4#[derive(Debug, Eq, PartialEq, Clone)]
5pub enum Message {
6 /// A text WebSocket message.
7 Text(String),
8 /// A binary WebSocket message.
9 Binary(Vec<u8>),
10 /// Message sent when the connection is closed.
11 Close(Option<String>)
12}