#[non_exhaustive]pub enum RejectionReason {
Show 17 variants
Unknown,
System,
Peer,
Resource,
Rogue,
Backlog,
Ipe,
Close,
Version,
RdvCookie,
BadSecret,
Unsecure,
MessageApi,
Congestion,
Filter,
Group,
Reserved(u32),
}Expand description
Handshake Rejection Reason (draft-sharabayko-srt-01 §4.3, Table 7). Sent
in place of a normal Handshake Type value (1000 + code, decoded via
HandshakeType::Reserved) when a connection attempt is refused.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown
1000: unknown reason.
System
1001: system function error.
Peer
1002: rejected by peer.
Resource
1003: resource allocation problem.
Rogue
1004: incorrect data in handshake.
Backlog
1005: listener’s backlog exceeded.
Ipe
1006: internal program error.
Close
1007: socket is closing.
Version
1008: peer is an older version than the agent’s minimum.
RdvCookie
1009: rendezvous cookie collision.
BadSecret
1010: wrong password.
Unsecure
1011: password required or unexpected.
MessageApi
1012: stream flag collision.
Congestion
1013: incompatible congestion-controller type.
Filter
1014: incompatible packet filter.
Group
1015: incompatible group.
Reserved(u32)
A 1000 + code value Table 7 does not define.
Implementations§
Source§impl RejectionReason
impl RejectionReason
Sourcepub fn from_bits(v: u32) -> Self
pub fn from_bits(v: u32) -> Self
Decode a Table 7 wire code (the value carried in Handshake Type,
i.e. already 1000 + code).
Sourcepub fn from_handshake_type(ht: HandshakeType) -> Option<Self>
pub fn from_handshake_type(ht: HandshakeType) -> Option<Self>
Recover the RejectionReason a peer sent back as a Handshake Type, or None if ht is a normal (non-rejection) handshake type.
Sourcepub fn to_handshake_type(self) -> HandshakeType
pub fn to_handshake_type(self) -> HandshakeType
Encode as the Handshake Type value a rejection packet carries.
Trait Implementations§
Source§impl Clone for RejectionReason
impl Clone for RejectionReason
Source§fn clone(&self) -> RejectionReason
fn clone(&self) -> RejectionReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RejectionReason
Source§impl Debug for RejectionReason
impl Debug for RejectionReason
Source§impl Display for RejectionReason
impl Display for RejectionReason
impl Eq for RejectionReason
Source§impl Hash for RejectionReason
impl Hash for RejectionReason
Source§impl PartialEq for RejectionReason
impl PartialEq for RejectionReason
Source§impl Serialize for RejectionReason
Available on crate feature serde only.
impl Serialize for RejectionReason
serde only.