Sdp

Struct Sdp 

Source
pub struct Sdp {
Show 15 fields pub version: Version, pub origin_username: String, pub origin_session_id: String, pub origin_session_version: String, pub origin_network_type: NetworkType, pub origin_address_type: AddressType, pub origin_unicast_address: String, pub session_name: String, pub session_description: Option<String>, pub connection_network_type: NetworkType, pub connection_address_type: AddressType, pub connection_address: String, pub timing: (u64, u64), pub tags: Vec<Tag>, pub media: Vec<Media>,
}

Fields§

§version: Version§origin_username: String§origin_session_id: String§origin_session_version: String§origin_network_type: NetworkType§origin_address_type: AddressType§origin_unicast_address: String§session_name: String§session_description: Option<String>§connection_network_type: NetworkType§connection_address_type: AddressType§connection_address: String§timing: (u64, u64)§tags: Vec<Tag>§media: Vec<Media>

Implementations§

Source§

impl Sdp

Source

pub fn new( origin: IpAddr, name: String, destination: IpAddr, time_range: TimeRange, ) -> Self

Source

pub fn with_username(self, username: &str) -> Self

Source

pub fn with_session_version(self, version: usize) -> Self

Source

pub fn with_description(self, description: &str) -> Self

Source

pub fn with_tag(self, tag: Tag) -> Self

Source

pub fn with_tags(self, tags: impl IntoIterator<Item = Tag>) -> Self

Source

pub fn with_media( self, kind: Kind, port: u16, protocol: Protocol, codec_info: CodecInfo<'_>, direction: Direction, ) -> Self

Trait Implementations§

Source§

impl Clone for Sdp

Source§

fn clone(&self) -> Sdp

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Sdp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Sdp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Sdp

§

impl RefUnwindSafe for Sdp

§

impl Send for Sdp

§

impl Sync for Sdp

§

impl Unpin for Sdp

§

impl UnwindSafe for Sdp

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.