pub struct RTCSessionDescription {
pub sdp_type: RTCSdpType,
pub sdp: String,
/* private fields */
}
Expand description
SessionDescription is used to expose local and remote session descriptions.
Fields§
§sdp_type: RTCSdpType
§sdp: String
Implementations§
source§impl RTCSessionDescription
impl RTCSessionDescription
sourcepub fn answer(sdp: String) -> Result<RTCSessionDescription>
pub fn answer(sdp: String) -> Result<RTCSessionDescription>
Given SDP representing an answer, wrap it in an RTCSessionDescription that can be given to an RTCPeerConnection.
sourcepub fn offer(sdp: String) -> Result<RTCSessionDescription>
pub fn offer(sdp: String) -> Result<RTCSessionDescription>
Given SDP representing an offer, wrap it in an RTCSessionDescription that can be given to an RTCPeerConnection.
sourcepub fn pranswer(sdp: String) -> Result<RTCSessionDescription>
pub fn pranswer(sdp: String) -> Result<RTCSessionDescription>
Given SDP representing an answer, wrap it in an RTCSessionDescription
that can be given to an RTCPeerConnection. pranswer
is used when the
answer may not be final, or when updating a previously sent pranswer.
sourcepub fn unmarshal(&self) -> Result<SessionDescription>
pub fn unmarshal(&self) -> Result<SessionDescription>
Unmarshal is a helper to deserialize the sdp
Trait Implementations§
source§impl Clone for RTCSessionDescription
impl Clone for RTCSessionDescription
source§fn clone(&self) -> RTCSessionDescription
fn clone(&self) -> RTCSessionDescription
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 RTCSessionDescription
impl Debug for RTCSessionDescription
source§impl Default for RTCSessionDescription
impl Default for RTCSessionDescription
source§fn default() -> RTCSessionDescription
fn default() -> RTCSessionDescription
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for RTCSessionDescription
impl<'de> Deserialize<'de> for RTCSessionDescription
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more