pub struct IceCandidate {
pub candidate: String,
pub sdp_mid: Option<String>,
pub sdp_mline_index: Option<u32>,
pub username_fragment: Option<String>,
}Expand description
IceCandidate 对应 WebRTC 标准中的 RTCIceCandidateInit 接口。
Fields§
§candidate: String§sdp_mid: Option<String>§sdp_mline_index: Option<u32>§username_fragment: Option<String>Implementations§
Source§impl IceCandidate
impl IceCandidate
Sourcepub fn sdp_mid(&self) -> &str
pub fn sdp_mid(&self) -> &str
Returns the value of sdp_mid, or the default value if sdp_mid is unset.
Sourcepub fn sdp_mline_index(&self) -> u32
pub fn sdp_mline_index(&self) -> u32
Returns the value of sdp_mline_index, or the default value if sdp_mline_index is unset.
Sourcepub fn username_fragment(&self) -> &str
pub fn username_fragment(&self) -> &str
Returns the value of username_fragment, or the default value if username_fragment is unset.
Trait Implementations§
Source§impl Clone for IceCandidate
impl Clone for IceCandidate
Source§fn clone(&self) -> IceCandidate
fn clone(&self) -> IceCandidate
Returns a duplicate 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 IceCandidate
impl Debug for IceCandidate
Source§impl Default for IceCandidate
impl Default for IceCandidate
Source§impl Hash for IceCandidate
impl Hash for IceCandidate
Source§impl Message for IceCandidate
impl Message for IceCandidate
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for IceCandidate
impl PartialEq for IceCandidate
impl Eq for IceCandidate
impl StructuralPartialEq for IceCandidate
Auto Trait Implementations§
impl Freeze for IceCandidate
impl RefUnwindSafe for IceCandidate
impl Send for IceCandidate
impl Sync for IceCandidate
impl Unpin for IceCandidate
impl UnwindSafe for IceCandidate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more