pub struct Attribute {
pub attribute: String,
pub value: Option<String>,
}Expand description
Attributes for the session or media.
See RFC 8866 Section 5.13 for more details.
Fields§
§attribute: StringAttribute name.
value: Option<String>Attribute value.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn new(attribute: impl ToString) -> Self
pub fn new(attribute: impl ToString) -> Self
Constructs an crate::Attribute.
Use crate::Attribute::with_value if you need to define the value.
Sourcepub fn with_value(attribute: impl ToString, value: impl ToString) -> Self
pub fn with_value(attribute: impl ToString, value: impl ToString) -> Self
Constructs an crate::Attribute and define its value.
Trait Implementations§
impl Eq for Attribute
Source§impl<T: TypedAttribute> From<T> for Attribute
impl<T: TypedAttribute> From<T> for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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