pub trait IntoReactiveValue {
// Required method
fn into_reactive_value(self) -> AttributeValue;
}Expand description
Trait for types that can be converted into a reactive string value.
This allows both static strings and signals to be used interchangeably in HTML attributes.
Required Methods§
Sourcefn into_reactive_value(self) -> AttributeValue
fn into_reactive_value(self) -> AttributeValue
Converts this value into an AttributeValue, wrapping signals
for reactive updates or converting static values to text.
Implementations on Foreign Types§
Source§impl IntoReactiveValue for &str
Converts a string slice into a text attribute value.
impl IntoReactiveValue for &str
Converts a string slice into a text attribute value.
fn into_reactive_value(self) -> AttributeValue
Source§impl IntoReactiveValue for String
Converts a static String into a text attribute value.
impl IntoReactiveValue for String
Converts a static String into a text attribute value.
fn into_reactive_value(self) -> AttributeValue
Implementors§
impl IntoReactiveValue for &'static CssClass
Converts a reference to a CSS class into an attribute value by cloning.
impl IntoReactiveValue for CssClass
Converts a CSS class reference into an attribute value.
impl IntoReactiveValue for Signal<bool>
Converts a mutable bool signal into a reactive attribute value.
The signal is mapped to a Signal<String> that yields "true" or "false",
enabling boolean attributes like checked to reactively update the DOM.
impl IntoReactiveValue for Signal<String>
Converts a string signal into a reactive attribute value.