Macro typed_html::text
source · macro_rules! text {
($t:expr) => { ... };
($format:tt, $($tail:tt),*) => { ... };
}
Expand description
Macro for creating text nodes.
Returns a boxed text node of type Box<TextNode>
.
These can be created inside the html!
macro directly by using string
literals. This macro is useful for creating text macros inside code blocks.
Examples
html!(
<p>{ text!("Hello Joe!") }</p>
)
html!(
<p>{ text!("Hello {}!", "Robert") }</p>
)