pub struct SdpSession {
pub version: u32,
pub origin_username: String,
pub session_id: String,
pub session_version: String,
pub origin_address: String,
pub session_name: String,
pub connection_address: Option<String>,
pub media_descriptions: Vec<MediaDescription>,
pub attributes: Vec<(String, Option<String>)>,
}Fields§
§version: u32§origin_username: String§session_id: String§session_version: String§origin_address: String§session_name: String§connection_address: Option<String>§media_descriptions: Vec<MediaDescription>§attributes: Vec<(String, Option<String>)>Implementations§
Source§impl SdpSession
impl SdpSession
pub fn new(address: &str) -> Self
pub fn add_audio_media(&mut self, port: u16) -> &mut MediaDescription
pub fn parse(input: &str) -> Result<Self, SdpError>
pub fn get_audio_port(&self) -> Option<u16>
pub fn get_connection_address(&self) -> Option<&str>
Sourcepub fn add_audio_media_directed(
&mut self,
port: u16,
direction: &str,
) -> &mut MediaDescription
pub fn add_audio_media_directed( &mut self, port: u16, direction: &str, ) -> &mut MediaDescription
Create an audio media section with a specific direction attribute (for hold/resume).
Sourcepub fn get_audio_direction(&self) -> Option<&str>
pub fn get_audio_direction(&self) -> Option<&str>
Get the media direction attribute (sendrecv, sendonly, recvonly, inactive).
pub fn get_audio_dtmf_payload_type(&self) -> Option<u8>
Trait Implementations§
Source§impl Clone for SdpSession
impl Clone for SdpSession
Source§fn clone(&self) -> SdpSession
fn clone(&self) -> SdpSession
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 SdpSession
impl Debug for SdpSession
Auto Trait Implementations§
impl Freeze for SdpSession
impl RefUnwindSafe for SdpSession
impl Send for SdpSession
impl Sync for SdpSession
impl Unpin for SdpSession
impl UnsafeUnpin for SdpSession
impl UnwindSafe for SdpSession
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