SessionLine

Enum SessionLine 

Source
#[non_exhaustive]
pub enum SessionLine<'a> { Version(Version), Name(SessionName<'a>), Timing(Timing), Origin(Origin<'a>), BandWidth(BandWidth), Uri(Uri<'a>), PhoneNumber(PhoneNumber<'a>), EmailAddress(EmailAddress<'a>), Connection(Connection), Description(SessionInformation<'a>), Media(Media<'a>), }
Expand description

Session Line

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Version(Version)

v=0

§

Name(SessionName<'a>)

s=-

§

Timing(Timing)

t=0 0

§

Origin(Origin<'a>)

o=- 20518 0 IN IP4 203.0.113.1

§

BandWidth(BandWidth)

b=AS:1024

§

Uri(Uri<'a>)

u=

§

PhoneNumber(PhoneNumber<'a>)

p=0118 999 881 999 119 7253

§

EmailAddress(EmailAddress<'a>)

“e=email@example.com”

§

Connection(Connection)

c=IN IP4 10.23.42.137

§

Description(SessionInformation<'a>)

§

Media(Media<'a>)

`m=video 51744 RTP/AVP 126 97 98 34 31

Implementations§

Source§

impl<'a> SessionLine<'a>

Source

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

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

Source§

impl<'a> SessionLine<'a>

Source

pub fn as_version_mut(&mut self) -> Option<&mut Version>

Optionally returns mutable references to the inner fields if this is a SessionLine::Version, otherwise None

Source

pub fn as_version(&self) -> Option<&Version>

Optionally returns references to the inner fields if this is a SessionLine::Version, otherwise None

Source

pub fn into_version(self) -> Result<Version, Self>

Returns the inner fields if this is a SessionLine::Version, otherwise returns back the enum in the Err case of the result

Source

pub fn as_name_mut(&mut self) -> Option<&mut SessionName<'a>>

Optionally returns mutable references to the inner fields if this is a SessionLine::Name, otherwise None

Source

pub fn as_name(&self) -> Option<&SessionName<'a>>

Optionally returns references to the inner fields if this is a SessionLine::Name, otherwise None

Source

pub fn into_name(self) -> Result<SessionName<'a>, Self>

Returns the inner fields if this is a SessionLine::Name, otherwise returns back the enum in the Err case of the result

Source

pub fn as_timing_mut(&mut self) -> Option<&mut Timing>

Optionally returns mutable references to the inner fields if this is a SessionLine::Timing, otherwise None

Source

pub fn as_timing(&self) -> Option<&Timing>

Optionally returns references to the inner fields if this is a SessionLine::Timing, otherwise None

Source

pub fn into_timing(self) -> Result<Timing, Self>

Returns the inner fields if this is a SessionLine::Timing, otherwise returns back the enum in the Err case of the result

Source

pub fn as_origin_mut(&mut self) -> Option<&mut Origin<'a>>

Optionally returns mutable references to the inner fields if this is a SessionLine::Origin, otherwise None

Source

pub fn as_origin(&self) -> Option<&Origin<'a>>

Optionally returns references to the inner fields if this is a SessionLine::Origin, otherwise None

Source

pub fn into_origin(self) -> Result<Origin<'a>, Self>

Returns the inner fields if this is a SessionLine::Origin, otherwise returns back the enum in the Err case of the result

Source

pub fn as_band_width_mut(&mut self) -> Option<&mut BandWidth>

Optionally returns mutable references to the inner fields if this is a SessionLine::BandWidth, otherwise None

Source

pub fn as_band_width(&self) -> Option<&BandWidth>

Optionally returns references to the inner fields if this is a SessionLine::BandWidth, otherwise None

Source

pub fn into_band_width(self) -> Result<BandWidth, Self>

Returns the inner fields if this is a SessionLine::BandWidth, otherwise returns back the enum in the Err case of the result

Source

pub fn as_uri_mut(&mut self) -> Option<&mut Uri<'a>>

Optionally returns mutable references to the inner fields if this is a SessionLine::Uri, otherwise None

Source

pub fn as_uri(&self) -> Option<&Uri<'a>>

Optionally returns references to the inner fields if this is a SessionLine::Uri, otherwise None

Source

pub fn into_uri(self) -> Result<Uri<'a>, Self>

Returns the inner fields if this is a SessionLine::Uri, otherwise returns back the enum in the Err case of the result

Source

pub fn as_phone_number_mut(&mut self) -> Option<&mut PhoneNumber<'a>>

Optionally returns mutable references to the inner fields if this is a SessionLine::PhoneNumber, otherwise None

Source

pub fn as_phone_number(&self) -> Option<&PhoneNumber<'a>>

Optionally returns references to the inner fields if this is a SessionLine::PhoneNumber, otherwise None

Source

pub fn into_phone_number(self) -> Result<PhoneNumber<'a>, Self>

Returns the inner fields if this is a SessionLine::PhoneNumber, otherwise returns back the enum in the Err case of the result

Source

pub fn as_email_address_mut(&mut self) -> Option<&mut EmailAddress<'a>>

Optionally returns mutable references to the inner fields if this is a SessionLine::EmailAddress, otherwise None

Source

pub fn as_email_address(&self) -> Option<&EmailAddress<'a>>

Optionally returns references to the inner fields if this is a SessionLine::EmailAddress, otherwise None

Source

pub fn into_email_address(self) -> Result<EmailAddress<'a>, Self>

Returns the inner fields if this is a SessionLine::EmailAddress, otherwise returns back the enum in the Err case of the result

Source

pub fn as_connection_mut(&mut self) -> Option<&mut Connection>

Optionally returns mutable references to the inner fields if this is a SessionLine::Connection, otherwise None

Source

pub fn as_connection(&self) -> Option<&Connection>

Optionally returns references to the inner fields if this is a SessionLine::Connection, otherwise None

Source

pub fn into_connection(self) -> Result<Connection, Self>

Returns the inner fields if this is a SessionLine::Connection, otherwise returns back the enum in the Err case of the result

Source

pub fn as_description_mut(&mut self) -> Option<&mut SessionInformation<'a>>

Optionally returns mutable references to the inner fields if this is a SessionLine::Description, otherwise None

Source

pub fn as_description(&self) -> Option<&SessionInformation<'a>>

Optionally returns references to the inner fields if this is a SessionLine::Description, otherwise None

Source

pub fn into_description(self) -> Result<SessionInformation<'a>, Self>

Returns the inner fields if this is a SessionLine::Description, otherwise returns back the enum in the Err case of the result

Source

pub fn as_media_mut(&mut self) -> Option<&mut Media<'a>>

Optionally returns mutable references to the inner fields if this is a SessionLine::Media, otherwise None

Source

pub fn as_media(&self) -> Option<&Media<'a>>

Optionally returns references to the inner fields if this is a SessionLine::Media, otherwise None

Source

pub fn into_media(self) -> Result<Media<'a>, Self>

Returns the inner fields if this is a SessionLine::Media, otherwise returns back the enum in the Err case of the result

Trait Implementations§

Source§

impl<'a> Clone for SessionLine<'a>

Source§

fn clone(&self) -> SessionLine<'a>

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<'a> Debug for SessionLine<'a>

Source§

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

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

impl<'a> PartialEq for SessionLine<'a>

Source§

fn eq(&self, other: &SessionLine<'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 uDisplay for SessionLine<'_>

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 SessionLine<'a>

Source§

impl<'a> StructuralPartialEq for SessionLine<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for SessionLine<'a>

§

impl<'a> RefUnwindSafe for SessionLine<'a>

§

impl<'a> Send for SessionLine<'a>

§

impl<'a> Sync for SessionLine<'a>

§

impl<'a> Unpin for SessionLine<'a>

§

impl<'a> UnwindSafe for SessionLine<'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> 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, 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.