pub enum OwnedAttributeValue<V: FromAnyValue = ()> {
Text(String),
Float(f64),
Int(i64),
Bool(bool),
Custom(V),
}
Expand description
The value of an attribute on a DOM node. This contains non-text values to allow users to skip parsing attribute values in some cases.
Variants§
Text(String)
A string value. This is the most common type of attribute.
Float(f64)
A floating point value.
Int(i64)
An integer value.
Bool(bool)
A boolean value.
Custom(V)
A custom value specific to the renderer
Implementations§
source§impl<V: FromAnyValue> OwnedAttributeValue<V>
impl<V: FromAnyValue> OwnedAttributeValue<V>
Trait Implementations§
source§impl<V: Clone + FromAnyValue> Clone for OwnedAttributeValue<V>
impl<V: Clone + FromAnyValue> Clone for OwnedAttributeValue<V>
source§fn clone(&self) -> OwnedAttributeValue<V>
fn clone(&self) -> OwnedAttributeValue<V>
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<V: FromAnyValue> Debug for OwnedAttributeValue<V>
impl<V: FromAnyValue> Debug for OwnedAttributeValue<V>
source§impl<V: FromAnyValue> From<&AttributeValue> for OwnedAttributeValue<V>
impl<V: FromAnyValue> From<&AttributeValue> for OwnedAttributeValue<V>
source§impl<V: FromAnyValue> From<String> for OwnedAttributeValue<V>
impl<V: FromAnyValue> From<String> for OwnedAttributeValue<V>
source§impl<V: FromAnyValue> From<V> for OwnedAttributeValue<V>
impl<V: FromAnyValue> From<V> for OwnedAttributeValue<V>
source§impl<V: FromAnyValue> From<bool> for OwnedAttributeValue<V>
impl<V: FromAnyValue> From<bool> for OwnedAttributeValue<V>
source§impl<V: FromAnyValue> From<f64> for OwnedAttributeValue<V>
impl<V: FromAnyValue> From<f64> for OwnedAttributeValue<V>
source§impl<V: FromAnyValue> From<i64> for OwnedAttributeValue<V>
impl<V: FromAnyValue> From<i64> for OwnedAttributeValue<V>
Auto Trait Implementations§
impl<V> Freeze for OwnedAttributeValue<V>where
V: Freeze,
impl<V> RefUnwindSafe for OwnedAttributeValue<V>where
V: RefUnwindSafe,
impl<V> Send for OwnedAttributeValue<V>where
V: Send,
impl<V> Sync for OwnedAttributeValue<V>where
V: Sync,
impl<V> Unpin for OwnedAttributeValue<V>where
V: Unpin,
impl<V> UnwindSafe for OwnedAttributeValue<V>where
V: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.