pub struct InnerHtmlAdapter<T> { /* private fields */ }Expand description
Adapts an inner_html: payload into the matching AttributeValue
variant (InnerHtml(String) for static strings, InnerHtmlSignal
for Signal<String>).
This is a sibling to AttrValueAdapter specialised for the
inner_html: attribute key. The html! macro emits
InnerHtmlAdapter::new(expr).into() whenever it sees an
inner_html: ... binding, so that inner_html: "raw" and
inner_html: my_signal route through set_inner_html rather than
the generic set_attribute_or_property path used for ordinary
Text attributes.
The actual String ↔ Signal<String> dispatch happens in the
From<InnerHtmlAdapter<T>> for AttributeValue impl below, where
the trait bounds on T decide which variant is produced.
Implementations§
Source§impl<T> InnerHtmlAdapter<T>
impl<T> InnerHtmlAdapter<T>
Trait Implementations§
Source§impl<T: Debug> Debug for InnerHtmlAdapter<T>
impl<T: Debug> Debug for InnerHtmlAdapter<T>
Source§impl From<InnerHtmlAdapter<&str>> for AttributeValue
From conversion into AttributeValue.
impl From<InnerHtmlAdapter<&str>> for AttributeValue
From conversion into AttributeValue.
Source§impl From<InnerHtmlAdapter<Signal<String>>> for AttributeValue
From conversion into AttributeValue.
impl From<InnerHtmlAdapter<Signal<String>>> for AttributeValue
From conversion into AttributeValue.
Source§impl From<InnerHtmlAdapter<String>> for AttributeValue
Adapts an inner_html: payload into the matching AttributeValue
variant, routing through set_inner_html instead of the generic
Text attribute path.
impl From<InnerHtmlAdapter<String>> for AttributeValue
Adapts an inner_html: payload into the matching AttributeValue
variant, routing through set_inner_html instead of the generic
Text attribute path.
The two blanket impls below cover the user-visible call sites:
StringproducesAttributeValue::InnerHtml(String::from("...")).Signal<String>producesAttributeValue::InnerHtmlSignal(signal).
Each impl only requires its specific source type, so the compiler
picks the right one based on the inferred T at the call site
(no manual .into() annotation needed).