pub enum SdpLine<'a> {
Session(SessionLine<'a>),
Attribute(AttributeLine<'a>),
Comment(Cow<'a, str>),
}
Expand description
Sdp Line
Variants
Session(SessionLine<'a>)
Attribute(AttributeLine<'a>)
Comment(Cow<'a, str>)
Implementations
sourceimpl<'a> SdpLine<'a>
impl<'a> SdpLine<'a>
sourcepub fn into_owned(self) -> SdpLine<'static>
pub fn into_owned(self) -> SdpLine<'static>
Returns a version of self
with all fields converted to owning versions.
sourceimpl<'a> SdpLine<'a>
impl<'a> SdpLine<'a>
sourcepub fn as_session_mut(&mut self) -> Option<&mut SessionLine<'a>>
pub fn as_session_mut(&mut self) -> Option<&mut SessionLine<'a>>
Optionally returns mutable references to the inner fields if this is a SdpLine::Session
, otherwise None
sourcepub fn as_session(&self) -> Option<&SessionLine<'a>>
pub fn as_session(&self) -> Option<&SessionLine<'a>>
Optionally returns references to the inner fields if this is a SdpLine::Session
, otherwise None
sourcepub fn into_session(self) -> Result<SessionLine<'a>, Self>
pub fn into_session(self) -> Result<SessionLine<'a>, Self>
Returns the inner fields if this is a SdpLine::Session
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_attribute_mut(&mut self) -> Option<&mut AttributeLine<'a>>
pub fn as_attribute_mut(&mut self) -> Option<&mut AttributeLine<'a>>
Optionally returns mutable references to the inner fields if this is a SdpLine::Attribute
, otherwise None
sourcepub fn as_attribute(&self) -> Option<&AttributeLine<'a>>
pub fn as_attribute(&self) -> Option<&AttributeLine<'a>>
Optionally returns references to the inner fields if this is a SdpLine::Attribute
, otherwise None
sourcepub fn into_attribute(self) -> Result<AttributeLine<'a>, Self>
pub fn into_attribute(self) -> Result<AttributeLine<'a>, Self>
Returns the inner fields if this is a SdpLine::Attribute
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_comment_mut(&mut self) -> Option<&mut Cow<'a, str>>
pub fn as_comment_mut(&mut self) -> Option<&mut Cow<'a, str>>
Optionally returns mutable references to the inner fields if this is a SdpLine::Comment
, otherwise None
sourcepub fn as_comment(&self) -> Option<&Cow<'a, str>>
pub fn as_comment(&self) -> Option<&Cow<'a, str>>
Optionally returns references to the inner fields if this is a SdpLine::Comment
, otherwise None
sourcepub fn into_comment(self) -> Result<Cow<'a, str>, Self>
pub fn into_comment(self) -> Result<Cow<'a, str>, Self>
Returns the inner fields if this is a SdpLine::Comment
, otherwise returns back the enum in the Err
case of the result