Struct webrtc_sdp::SdpSession

source ·
pub struct SdpSession {
    pub version: u64,
    pub origin: SdpOrigin,
    pub session: Option<String>,
    pub connection: Option<SdpConnection>,
    pub bandwidth: Vec<SdpBandwidth>,
    pub timing: Option<SdpTiming>,
    pub attribute: Vec<SdpAttribute>,
    pub media: Vec<SdpMedia>,
    pub warnings: Vec<SdpParserError>,
}

Fields§

§version: u64§origin: SdpOrigin§session: Option<String>§connection: Option<SdpConnection>§bandwidth: Vec<SdpBandwidth>§timing: Option<SdpTiming>§attribute: Vec<SdpAttribute>§media: Vec<SdpMedia>§warnings: Vec<SdpParserError>

Implementations§

source§

impl SdpSession

source

pub fn new(version: u64, origin: SdpOrigin, session: String) -> SdpSession

source

pub fn get_version(&self) -> u64

source

pub fn get_origin(&self) -> &SdpOrigin

source

pub fn get_session(&self) -> &Option<String>

source

pub fn get_session_text(&self) -> &str

source

pub fn get_connection(&self) -> &Option<SdpConnection>

source

pub fn set_connection(&mut self, c: SdpConnection)

source

pub fn add_bandwidth(&mut self, b: SdpBandwidth)

source

pub fn set_timing(&mut self, t: SdpTiming)

source

pub fn add_attribute( &mut self, a: SdpAttribute ) -> Result<(), SdpParserInternalError>

source

pub fn extend_media(&mut self, v: Vec<SdpMedia>)

source

pub fn parse_session_vector( &mut self, lines: &mut Vec<SdpLine> ) -> Result<(), SdpParserError>

source

pub fn get_attribute(&self, t: SdpAttributeType) -> Option<&SdpAttribute>

source

pub fn add_media( &mut self, media_type: SdpMediaValue, direction: SdpAttribute, port: u32, protocol: SdpProtocolValue, addr: ExplicitlyTypedAddress ) -> Result<(), SdpParserInternalError>

Trait Implementations§

source§

impl AnonymizingClone for SdpSession

source§

fn masked_clone(&self, anon: &mut StatefulSdpAnonymizer) -> Self

source§

impl Clone for SdpSession

source§

fn clone(&self) -> SdpSession

Returns a copy 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 SdpSession

source§

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

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

impl Display for SdpSession

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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,

§

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§

default 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>,

§

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>,

§

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.