pub enum CandidateType {
Host,
ServerReflexive,
PeerReflexive,
Relayed,
}Expand description
How a candidate was obtained (RFC 8839 §5.1, RFC 8445 §5.1.1).
Variants§
Host
A local interface address.
ServerReflexive
An address a STUN server reported.
PeerReflexive
An address learned from a peer’s connectivity check.
Relayed
An address on a TURN relay.
Implementations§
Source§impl CandidateType
impl CandidateType
Sourcepub fn parse(token: &str) -> Option<Self>
pub fn parse(token: &str) -> Option<Self>
The type a token names, if it is one sipx knows.
candidate-types ends in token, so the set is extensible and a peer may name one sipx
has never heard of. None here makes Candidate::parse ignore the line, which is the
conservative reading rather than the only legal one: RFC 8839 §5.1 requires a document
defining a new candidate type to define how it is processed, so a type sipx does not know
is a type whose processing rules sipx does not have. Checking it as though it were a host
candidate would be guessing at those rules against a peer that published them.
Trait Implementations§
Source§impl Clone for CandidateType
impl Clone for CandidateType
Source§fn clone(&self) -> CandidateType
fn clone(&self) -> CandidateType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CandidateType
impl Debug for CandidateType
Source§impl Hash for CandidateType
impl Hash for CandidateType
Source§impl PartialEq for CandidateType
impl PartialEq for CandidateType
Source§fn eq(&self, other: &CandidateType) -> bool
fn eq(&self, other: &CandidateType) -> bool
self and other values to be equal, and is used by ==.