Function mt_dom::text

source · []
pub fn text<S, NS, TAG, ATT, VAL>(s: S) -> Node<NS, TAG, ATT, VAL> where
    S: ToString,
    NS: PartialEq + Clone + Debug,
    TAG: PartialEq + Clone + Debug,
    ATT: PartialEq + Clone + Debug,
    VAL: PartialEq + Clone + Debug
Expand description

Create a text node element

Example

use mt_dom::{Node,text};

let txt:Node<&'static str, &'static str, &'static str, &'static str> =
    text("This is a text node");