Enum html_page::AttributeValue
source · pub enum AttributeValue {
String(String),
Boolean,
}
Expand description
The value of an element attribute.
Attributes may be “boolean” (just the name of an attribute), or a key/value pair, where the value is a string. Technically, in HTML, a boolean attribute with a true value can be expressed as a key/value pair with a value that is an empty string or the name of the attribute, but in this representation we make it more explicit.
Variants§
String(String)
The value of a key/value attribute.
Boolean
A boolean attribute. It the attribute is present, the value is true.
Implementations§
Trait Implementations§
source§impl Clone for AttributeValue
impl Clone for AttributeValue
source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AttributeValue
impl Debug for AttributeValue
source§impl PartialEq for AttributeValue
impl PartialEq for AttributeValue
source§fn eq(&self, other: &AttributeValue) -> bool
fn eq(&self, other: &AttributeValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for AttributeValue
impl StructuralPartialEq for AttributeValue
Auto Trait Implementations§
impl Freeze for AttributeValue
impl RefUnwindSafe for AttributeValue
impl Send for AttributeValue
impl Sync for AttributeValue
impl Unpin for AttributeValue
impl UnwindSafe for AttributeValue
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