pub struct TrustedHtml;Expand description
Everything as written, scripts included — only for content you control.
Trait Implementations§
Source§impl Clone for TrustedHtml
impl Clone for TrustedHtml
impl Copy for TrustedHtml
Source§impl Debug for TrustedHtml
impl Debug for TrustedHtml
Source§impl Default for TrustedHtml
impl Default for TrustedHtml
Source§impl HtmlPolicy for TrustedHtml
impl HtmlPolicy for TrustedHtml
Source§fn element(&self, _name: &str) -> ElementAction
fn element(&self, _name: &str) -> ElementAction
What happens to an element of raw HTML. The name is lowercase.
Source§fn attribute<'v>(
&self,
_element: &str,
_name: &str,
value: &'v str,
) -> Option<Cow<'v, str>>
fn attribute<'v>( &self, _element: &str, _name: &str, value: &'v str, ) -> Option<Cow<'v, str>>
The value an attribute of a kept element gets — the same one or changed —
or
None, which drops the attribute. Names are lowercase and character references
in values are already resolved (j is j).Auto Trait Implementations§
impl Freeze for TrustedHtml
impl RefUnwindSafe for TrustedHtml
impl Send for TrustedHtml
impl Sync for TrustedHtml
impl Unpin for TrustedHtml
impl UnsafeUnpin for TrustedHtml
impl UnwindSafe for TrustedHtml
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