Function sauron::prelude::text[]

pub fn text<S, NS, TAG, ATT, VAL>(s: S) -> Node<NS, TAG, ATT, VAL> where
    S: ToString,
    NS: PartialEq<NS> + Clone + Debug,
    TAG: PartialEq<TAG> + Clone + Debug,
    ATT: PartialEq<ATT> + Clone + Debug,
    VAL: PartialEq<VAL> + 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");