Session

Struct Session 

Source
pub struct Session<'a> {
    pub version: Option<Version>,
    pub name: Option<SessionName<'a>>,
    pub timing: Option<Timing>,
    pub origin: Option<Origin<'a>>,
    pub band_width: Option<BandWidth>,
    pub uri: Option<Uri<'a>>,
    pub phone_number: Option<PhoneNumber<'a>>,
    pub email_address: Option<EmailAddress<'a>>,
    pub connection: Option<Connection>,
    pub description: Option<SessionInformation<'a>>,
    pub attributes: Vec<AttributeLine<'a>>,
    pub media: Vec<MediaSection<'a>>,
}

Fields§

§version: Option<Version>

v=0

§name: Option<SessionName<'a>>

s=-

§timing: Option<Timing>

t=0 0

§origin: Option<Origin<'a>>

o=- 20518 0 IN IP4 203.0.113.1

§band_width: Option<BandWidth>

b=AS:1024

§uri: Option<Uri<'a>>

u=

§phone_number: Option<PhoneNumber<'a>>

p=0118 999 881 999 119 7253

§email_address: Option<EmailAddress<'a>>

“e=email@example.com”

§connection: Option<Connection>

c=IN IP4 10.23.42.137

§description: Option<SessionInformation<'a>>§attributes: Vec<AttributeLine<'a>>§media: Vec<MediaSection<'a>>

Implementations§

Source§

impl<'a> Session<'a>

Source

pub fn into_owned(self) -> Session<'static>

Returns a version of self with all fields converted to owning versions.

Source§

impl<'a> Session<'a>

Source

pub fn read_str(sdp: &'a str) -> Session<'a>

Source

pub fn modify_media<F>(self, f: F) -> Self
where F: Fn(MediaSection<'_>) -> MediaSection<'_>,

Trait Implementations§

Source§

impl<'a> Debug for Session<'a>

Source§

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

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

impl<'a> Default for Session<'a>

Source§

fn default() -> Session<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> PartialEq for Session<'a>

Source§

fn eq(&self, other: &Session<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToString for Session<'_>

Source§

fn to_string(&self) -> String

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

impl uDisplay for Session<'_>

Source§

fn fmt<W>(&self, f: &mut Formatter<'_, W>) -> Result<(), W::Error>
where W: uWrite + ?Sized,

Formats the value using the given formatter
Source§

impl<'a> Eq for Session<'a>

Source§

impl<'a> StructuralPartialEq for Session<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Session<'a>

§

impl<'a> RefUnwindSafe for Session<'a>

§

impl<'a> Send for Session<'a>

§

impl<'a> Sync for Session<'a>

§

impl<'a> Unpin for Session<'a>

§

impl<'a> UnwindSafe for Session<'a>

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