Skip to main content

IntoReactiveString

Trait IntoReactiveString 

Source
pub trait IntoReactiveString {
    // Required method
    fn into_reactive_string(self) -> String;
}
Expand description

Trait for converting a value into a string for reactive attribute updates.

Used by the html! macro when an attribute value contains an if condition. The result is stored in a Signal<String> that re-evaluates whenever any signal changes — mirroring the DOM-level DynamicNode mechanism.

Implementations are provided for String, &str, CssClass, bool, numeric types, and Signal<T> (which resolves the signal first).

Required Methods§

Source

fn into_reactive_string(self) -> String

Converts this value into its string representation for attribute storage.

Implementations on Foreign Types§

Source§

impl IntoReactiveString for &str

Converts a string slice into an owned string for reactive string storage.

Source§

impl IntoReactiveString for bool

Converts a bool into "true" or "false" for reactive string storage.

Source§

impl IntoReactiveString for f64

Converts a f64 into a string for reactive string storage.

Source§

impl IntoReactiveString for i32

Converts an i32 into a string for reactive string storage.

Source§

impl IntoReactiveString for u32

Converts a u32 into a string for reactive string storage.

Source§

impl IntoReactiveString for String

Converts a String into its own value for reactive string storage.

Implementors§

Source§

impl IntoReactiveString for &'static CssClass

Converts a reference to a CssClass into its class name for reactive string storage.

Source§

impl IntoReactiveString for CssClass

Converts a CssClass into its class name for reactive string storage.

Source§

impl IntoReactiveString for Signal<bool>

Converts a bool signal into a reactive string by resolving its current value.

Source§

impl IntoReactiveString for Signal<String>

Converts a string signal into a reactive string by resolving its current value.