pub struct HtmlWriter<'a, 'b> { /* private fields */ }Expand description
A writer created by HtmlContext::writer that makes everything written
to it safe for its context before appending it to the underlying
Formatter.
The inherent methods mirror fmt::Write, which the writer also
implements for use with write!.
Implementations§
Source§impl HtmlWriter<'_, '_>
impl HtmlWriter<'_, '_>
Sourcepub fn write_str(&mut self, s: &str)
pub fn write_str(&mut self, s: &str)
Writes s, escaped or validated for this writer’s context.
§Panics
Panics in the ident contexts (AttributeKey,
ElementName) when s contains a
character that could break out of the identifier, since HTML has no
escape mechanism there.
Sourcepub fn write_char(&mut self, c: char)
pub fn write_char(&mut self, c: char)
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'b> !UnwindSafe for HtmlWriter<'a, 'b>
impl<'a, 'b> Freeze for HtmlWriter<'a, 'b>
impl<'a, 'b> RefUnwindSafe for HtmlWriter<'a, 'b>
impl<'a, 'b> Send for HtmlWriter<'a, 'b>
impl<'a, 'b> Sync for HtmlWriter<'a, 'b>
impl<'a, 'b> Unpin for HtmlWriter<'a, 'b>
impl<'a, 'b> UnsafeUnpin for HtmlWriter<'a, 'b>
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