pub struct CandidateOwned { /* private fields */ }Expand description
An ICE candidate.
Backed inside a heap allocation.
Implementations§
Source§impl CandidateOwned
impl CandidateOwned
Sourcepub fn to_sdp_string(&self) -> String
pub fn to_sdp_string(&self) -> String
Serialize this candidate to a string for use in SDP
§Examples
let addr: Address = "127.0.0.1:2345".parse().unwrap();
let candidate = Candidate::builder(
1,
CandidateType::Host,
TransportType::Udp,
"foundation",
addr,
)
.priority(1234)
.build();
assert_eq!(candidate.to_sdp_string(), "a=candidate:foundation 1 UDP 1234 127.0.0.1 2345 typ host")Trait Implementations§
Source§impl CandidateApi for CandidateOwned
impl CandidateApi for CandidateOwned
Source§fn component_id(&self) -> usize
fn component_id(&self) -> usize
The component
Source§fn candidate_type(&self) -> CandidateType
fn candidate_type(&self) -> CandidateType
The type of the Candidate
Source§fn transport(&self) -> TransportType
fn transport(&self) -> TransportType
The network transport
Source§fn foundation(&self) -> String
fn foundation(&self) -> String
The (unique) foundation
Source§fn base_address(&self) -> Address
fn base_address(&self) -> Address
The address to send from
Any related address that generated this candidate, e.g. STUN/TURN server
Source§impl Clone for CandidateOwned
impl Clone for CandidateOwned
Source§impl Debug for CandidateOwned
impl Debug for CandidateOwned
Source§impl Drop for CandidateOwned
impl Drop for CandidateOwned
Source§impl PartialEq<Candidate> for CandidateOwned
impl PartialEq<Candidate> for CandidateOwned
Source§impl PartialEq<CandidateOwned> for Candidate
impl PartialEq<CandidateOwned> for Candidate
Source§impl PartialEq for CandidateOwned
impl PartialEq for CandidateOwned
impl Eq for CandidateOwned
impl Send for CandidateOwned
impl Sync for CandidateOwned
Auto Trait Implementations§
impl Freeze for CandidateOwned
impl RefUnwindSafe for CandidateOwned
impl Unpin for CandidateOwned
impl UnwindSafe for CandidateOwned
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)