pub enum AttributeValue {
Text(String),
Signal(Signal<String>),
Event(NativeEventHandler),
Dynamic(String),
Css(CssClass),
}Expand description
Represents the value of an HTML attribute.
Attributes can be static text, reactive signals, event handlers, dynamic expressions, or CSS class references.
Variants§
Text(String)
A static string value.
Signal(Signal<String>)
A dynamic signal-backed value.
Event(NativeEventHandler)
An event handler callback.
Dynamic(String)
A dynamic expression value of any type (for component props).
Css(CssClass)
A CSS class reference created by the class! macro.
Trait Implementations§
Source§impl Clone for AttributeValue
impl Clone for AttributeValue
Source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AttributeValue
impl Debug for AttributeValue
Source§impl PartialEq for AttributeValue
Visual equality comparison for attribute values.
impl PartialEq for AttributeValue
Visual equality comparison for attribute values.
Compares values by their visual output rather than identity. Signal
values are compared by their current resolved string; when both signals
share the same inner pointer, they are always considered unequal
because the signal may have mutated between VDOM snapshots and .get()
would return the same current value for both, masking the change.
Event values are always considered equal (re-binding is handled by the
handler registry), and CssClass values are compared by class name.