pub struct SafeHtml(/* private fields */);Expand description
HTML that is already escaped and safe to print as it is.
Every helper in this crate returns SafeHtml. Printing it with {} writes
the HTML without escaping it again. With the askama feature it is not
escaped by askama, and with the maud feature it implements
maud::Render.
Implementations§
Source§impl SafeHtml
impl SafeHtml
Sourcepub fn from_trusted(html: impl Into<String>) -> Self
pub fn from_trusted(html: impl Into<String>) -> Self
Wraps a string you know is safe HTML. Nothing is escaped.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
The HTML as an owned string.
Trait Implementations§
impl Eq for SafeHtml
impl HtmlSafe for SafeHtml
Available on crate feature
askama only.impl StructuralPartialEq for SafeHtml
Auto Trait Implementations§
impl Freeze for SafeHtml
impl RefUnwindSafe for SafeHtml
impl Send for SafeHtml
impl Sync for SafeHtml
impl Unpin for SafeHtml
impl UnsafeUnpin for SafeHtml
impl UnwindSafe for SafeHtml
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