Skip to main content

IntoReactiveValue

Trait IntoReactiveValue 

Source
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§

Source

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.

Source§

impl IntoReactiveValue for String

Converts a static String into a text attribute value.

Implementors§

Source§

impl IntoReactiveValue for &'static CssClass

Converts a reference to a CSS class into an attribute value by cloning.

Source§

impl IntoReactiveValue for CssClass

Converts a CSS class reference into an attribute value.

Source§

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.

Source§

impl IntoReactiveValue for Signal<String>

Converts a string signal into a reactive attribute value.