[−][src]Macro lol_html::doctype
A convenience macro to construct a handler for document type declarations in the HTML document.
Example
use lol_html::{rewrite_str, doctype, RewriteStrSettings}; use lol_html::html_content::ContentType; rewrite_str( r#"<!doctype html>"#, RewriteStrSettings { document_content_handlers: vec![ doctype!(|d| { assert_eq!(d.name().unwrap(), "html"); Ok(()) }) ], ..RewriteStrSettings::default() } ).unwrap();