#[non_exhaustive]pub enum AttributeValue<'a> {
String(Cow<'a, str>),
Bool(bool),
None,
}Expand description
An AttributeValue represents the value of an attribute in a document.
An attribute value can be a string, a boolean, or nothing
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.
String(Cow<'a, str>)
A string attribute value.
Bool(bool)
A boolean attribute value. false means it is unset.
None
No value (or it was unset)
Trait Implementations§
Source§impl<'a> Clone for AttributeValue<'a>
impl<'a> Clone for AttributeValue<'a>
Source§fn clone(&self) -> AttributeValue<'a>
fn clone(&self) -> AttributeValue<'a>
Returns a duplicate 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<'a> Debug for AttributeValue<'a>
impl<'a> Debug for AttributeValue<'a>
Source§impl Display for AttributeValue<'_>
impl Display for AttributeValue<'_>
Source§impl<'a> From<&'a str> for AttributeValue<'a>
impl<'a> From<&'a str> for AttributeValue<'a>
Source§impl From<()> for AttributeValue<'_>
impl From<()> for AttributeValue<'_>
Source§impl From<String> for AttributeValue<'_>
impl From<String> for AttributeValue<'_>
Source§impl From<bool> for AttributeValue<'_>
impl From<bool> for AttributeValue<'_>
Source§impl<'a> PartialEq for AttributeValue<'a>
impl<'a> PartialEq for AttributeValue<'a>
Source§impl<'a> Serialize for AttributeValue<'a>
impl<'a> Serialize for AttributeValue<'a>
impl<'a> StructuralPartialEq for AttributeValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for AttributeValue<'a>
impl<'a> RefUnwindSafe for AttributeValue<'a>
impl<'a> Send for AttributeValue<'a>
impl<'a> Sync for AttributeValue<'a>
impl<'a> Unpin for AttributeValue<'a>
impl<'a> UnsafeUnpin for AttributeValue<'a>
impl<'a> UnwindSafe for AttributeValue<'a>
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