Struct librice::candidate::CandidatePair
source · Fields§
§local: Candidate
§remote: Candidate
Implementations§
source§impl CandidatePair
impl CandidatePair
sourcepub fn new(local: Candidate, remote: Candidate) -> Self
pub fn new(local: Candidate, remote: Candidate) -> Self
Create a new CandidatePair
Panic
- If the component id is different between the local and remote candidates
- If the transport type is different between the local and remote candidates
Examples
let addr: SocketAddr = "127.0.0.1:2345".parse().unwrap();
let candidate = Candidate::builder(
0,
CandidateType::Host,
TransportType::Udp,
"foundation",
addr,
)
.priority(1234)
.build();
let pair = CandidatePair::new(candidate.clone(), candidate);
Trait Implementations§
source§impl Clone for CandidatePair
impl Clone for CandidatePair
source§fn clone(&self) -> CandidatePair
fn clone(&self) -> CandidatePair
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CandidatePair
impl Debug for CandidatePair
source§impl PartialEq<CandidatePair> for CandidatePair
impl PartialEq<CandidatePair> for CandidatePair
source§fn eq(&self, other: &CandidatePair) -> bool
fn eq(&self, other: &CandidatePair) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.