Struct websocket::header::WebSocketKey [] [src]

pub struct WebSocketKey(pub [u8; 16]);

Represents a Sec-WebSocket-Key header.

Methods

impl WebSocketKey

fn new() -> WebSocketKey

Generate a new, random WebSocketKey

fn serialize(&self) -> String

Return the Base64 encoding of this WebSocketKey

Trait Implementations

impl Debug for WebSocketKey

fn fmt(&self, f: &mut Formatter) -> Result

impl FromStr for WebSocketKey

type Err = WebSocketError

fn from_str(key: &str) -> WebSocketResult<WebSocketKey>

impl Header for WebSocketKey

fn header_name() -> &'static str

fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketKey>

impl HeaderFormat for WebSocketKey

fn fmt_header(&self, fmt: &mut Formatter) -> Result

Derived Implementations

impl Copy for WebSocketKey

impl Clone for WebSocketKey

fn clone(&self) -> WebSocketKey

1.0.0fn clone_from(&mut self, source: &Self)

impl PartialEq for WebSocketKey

fn eq(&self, __arg_0: &WebSocketKey) -> bool

fn ne(&self, __arg_0: &WebSocketKey) -> bool