http_type/websocket_frame/
type.rs

1use crate::*;
2
3pub type WebsocketFrameWithLengthOption = Option<(WebSocketFrame, usize)>;
4
5/// Represents a decoded WebSocket frame
6#[derive(Debug, Clone, Lombok, Default, DisplayDebug)]
7pub struct WebSocketFrame {
8    /// FIN flag indicating if this is the final frame
9    #[set(skip)]
10    pub(super) fin: bool,
11    /// Opcode indicating the frame type (text, binary, etc.)
12    #[set(skip)]
13    pub(super) opcode: u8,
14    /// Mask flag indicating if the payload is masked
15    #[set(skip)]
16    pub(super) mask: bool,
17    /// The payload data of the frame
18    #[set(skip)]
19    pub(super) payload_data: Vec<u8>,
20}