pub enum SdpLine<'a> {
Session(SessionLine<'a>),
Attribute(AttributeLine<'a>),
Comment(Cow<'a, str>),
}
Expand description
Sdp Line
Variants§
Implementations§
Source§impl<'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.
Source§impl<'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