pub struct Html { /* private fields */ }
Expand description
Simple HTML builder
Implementations§
Source§impl Html
impl Html
Sourcepub fn new_xml_compatible() -> Self
pub fn new_xml_compatible() -> Self
Create an XML-compatible HTML builder
Sourcepub fn with_doctype() -> Self
pub fn with_doctype() -> Self
Create an HTML builder with a doctype
preamble
Sourcepub fn comment(&mut self, com: impl AsRef<str>) -> &mut Self
pub fn comment(&mut self, com: impl AsRef<str>) -> &mut Self
Add a comment
The characters -
, <
and >
in com
will automatically be
escaped.
Sourcepub fn text(&mut self, text: impl AsRef<str>) -> &mut Self
pub fn text(&mut self, text: impl AsRef<str>) -> &mut Self
Add text content
The characters &
, <
and >
in text
will automatically be
escaped.
Sourcepub fn text_len(&mut self, text: impl AsRef<str>, len: usize) -> &mut Self
pub fn text_len(&mut self, text: impl AsRef<str>, len: usize) -> &mut Self
Add text content with a maximum character limit
The characters &
, <
and >
in text
will automatically be
escaped.
Source§impl Html
impl Html
Sourcepub fn blockquote(&mut self) -> Elem<'_>
pub fn blockquote(&mut self) -> Elem<'_>
Add blockquote element
Add button element
Sourcepub fn figcaption(&mut self) -> Elem<'_>
pub fn figcaption(&mut self) -> Elem<'_>
Add figcaption element
Add footer element
Add menu element
Add nav element
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Html
impl RefUnwindSafe for Html
impl Send for Html
impl Sync for Html
impl Unpin for Html
impl UnwindSafe for Html
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more