#[non_exhaustive]pub enum Attribute {
NameNoValue(String),
NameValue {
double_quote: bool,
name: String,
value: String,
},
}Expand description
Name and optionally a value for an attribute of a tag.
Attributes provide information about a tag. They can consist in a simple
name, or also have a value, after an = sign. The values are always
surrounded either by single or double quotes.
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.
NameNoValue(String)
Name of the attribute, when it doesn’t have a value
§Examples
In <button />, the name of the attribute is button.
NameValue
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin 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