Enum websocket::header::WebSocketVersion
source · [−]pub enum WebSocketVersion {
WebSocket13,
Unknown(String),
}
Expand description
Represents a Sec-WebSocket-Version header
Variants
WebSocket13
The version of WebSocket defined in RFC6455
Unknown(String)
An unknown version of WebSocket
Trait Implementations
sourceimpl Clone for WebSocketVersion
impl Clone for WebSocketVersion
sourcefn clone(&self) -> WebSocketVersion
fn clone(&self) -> WebSocketVersion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for WebSocketVersion
impl Debug for WebSocketVersion
sourceimpl Display for WebSocketVersion
impl Display for WebSocketVersion
sourceimpl Header for WebSocketVersion
impl Header for WebSocketVersion
sourcefn header_name() -> &'static str
fn header_name() -> &'static str
Returns the name of the header field this belongs to. Read more
sourcefn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketVersion>
fn parse_header(raw: &[Vec<u8>]) -> Result<WebSocketVersion>
Parse a header from a raw stream of bytes. Read more
sourceimpl HeaderFormat for WebSocketVersion
impl HeaderFormat for WebSocketVersion
sourcefn fmt_header(&self, fmt: &mut Formatter<'_>) -> Result
fn fmt_header(&self, fmt: &mut Formatter<'_>) -> Result
Format a header to be output into a TcpStream. Read more
sourceimpl PartialEq<WebSocketVersion> for WebSocketVersion
impl PartialEq<WebSocketVersion> for WebSocketVersion
sourcefn eq(&self, other: &WebSocketVersion) -> bool
fn eq(&self, other: &WebSocketVersion) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &WebSocketVersion) -> bool
fn ne(&self, other: &WebSocketVersion) -> bool
This method tests for !=
.
impl StructuralPartialEq for WebSocketVersion
Auto Trait Implementations
impl RefUnwindSafe for WebSocketVersion
impl Send for WebSocketVersion
impl Sync for WebSocketVersion
impl Unpin for WebSocketVersion
impl UnwindSafe for WebSocketVersion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more