pub struct Attribute {
pub key: String,
pub value: Option<String>,
}Expand description
Attribute describes the “a=” field which represents the primary means for extending SDP.
Fields§
§key: StringThe attribute name, the part before the :.
value: Option<String>The attribute value, or None for a flag attribute such as a=rtcp-mux.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn parts(&self) -> (&str, Option<&str>)
pub fn parts(&self) -> (&str, Option<&str>)
The attribute’s name and value, whichever way it was built.
A parsed attribute has its name in Attribute::key and what follows the first
colon in Attribute::value. An attribute built with the whole line as its key
(with_property_attribute("msid:stream track"), which prints the same line) is
split at its first colon here, so that both forms read alike.
Sourcepub fn is_ice_candidate(&self) -> bool
pub fn is_ice_candidate(&self) -> bool
is_ice_candidate returns true if the attribute key equals “candidate”.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Attribute
impl Freeze for Attribute
impl Move for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attributewhere
RawVecInner: Send,
impl Sync for Attributewhere
RawVecInner: Sync,
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attributewhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more