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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AttributeValue
impl !RefUnwindSafe for AttributeValue
impl !Send for AttributeValue
impl !Sync for AttributeValue
impl Unpin for AttributeValue
impl UnsafeUnpin 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