Enum saltyrtc_client::CloseCode [−][src]
pub enum CloseCode { WsClosingNormal, WsGoingAway, WsProtocolError, PathFull, ProtocolError, InternalError, Handover, DroppedByInitiator, InitiatorCouldNotDecrypt, NoSharedTask, InvalidKey, Other(u16), }
Close codes used by SaltyRTC.
Variants
WsClosingNormal
Websocket closed successfully (WebSocket internal close code)
WsGoingAway
Going away (WebSocket internal close code)
WsProtocolError
Protocol error (WebSocket internal close code)
PathFull
Path full
ProtocolError
SaltyRTC protocol error
InternalError
Internal error
Handover
Handover of the signalling channel
DroppedByInitiator
Dropped by initiator
InitiatorCouldNotDecrypt
Initiator could not decrypt
No shared task found
InvalidKey
Invalid key
Other(u16)
Other close code
Methods
impl CloseCode
[src]
impl CloseCode
pub fn as_number(&self) -> u16
[src]
pub fn as_number(&self) -> u16
Return the numeric close code.
pub fn from_number(code: u16) -> CloseCode
[src]
pub fn from_number(code: u16) -> CloseCode
Create a CloseCode
instance from a numeric close code.
Trait Implementations
impl Debug for CloseCode
[src]
impl Debug for CloseCode
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for CloseCode
[src]
impl Copy for CloseCode
impl Clone for CloseCode
[src]
impl Clone for CloseCode
fn clone(&self) -> CloseCode
[src]
fn clone(&self) -> CloseCode
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for CloseCode
[src]
impl PartialEq for CloseCode
fn eq(&self, other: &CloseCode) -> bool
[src]
fn eq(&self, other: &CloseCode) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &CloseCode) -> bool
[src]
fn ne(&self, other: &CloseCode) -> bool
This method tests for !=
.
impl Eq for CloseCode
[src]
impl Eq for CloseCode
impl Display for CloseCode
[src]
impl Display for CloseCode