Trait HtmlSafe

Source
pub trait HtmlSafe: Display { }
Expand description

Types that implement this marker trait don’t need to be HTML escaped

Please note that this trait is only meant as speed-up helper. In some odd circumcises askama might still decide to HTML escape the input, so if this must not happen, then you need to use the |safe filter to prevent the auto escaping.

If you are unsure if your type generates HTML safe output in all cases, then DON’T mark it. Better safe than sorry!

Implementations on Foreign Types§

Source§

impl HtmlSafe for bool

Source§

impl HtmlSafe for f32

Source§

impl HtmlSafe for f64

Source§

impl HtmlSafe for i8

Source§

impl HtmlSafe for i16

Source§

impl HtmlSafe for i32

Source§

impl HtmlSafe for i64

Source§

impl HtmlSafe for i128

Source§

impl HtmlSafe for isize

Source§

impl HtmlSafe for u8

Source§

impl HtmlSafe for u16

Source§

impl HtmlSafe for u32

Source§

impl HtmlSafe for u64

Source§

impl HtmlSafe for u128

Source§

impl HtmlSafe for usize

Source§

impl HtmlSafe for NonZeroI8

Source§

impl HtmlSafe for NonZeroI16

Source§

impl HtmlSafe for NonZeroI32

Source§

impl HtmlSafe for NonZeroI64

Source§

impl HtmlSafe for NonZeroI128

Source§

impl HtmlSafe for NonZeroIsize

Source§

impl HtmlSafe for NonZeroU8

Source§

impl HtmlSafe for NonZeroU16

Source§

impl HtmlSafe for NonZeroU32

Source§

impl HtmlSafe for NonZeroU64

Source§

impl HtmlSafe for NonZeroU128

Source§

impl HtmlSafe for NonZeroUsize

Source§

impl<T> HtmlSafe for Cow<'_, T>
where T: HtmlSafe + ToOwned + ?Sized, T::Owned: HtmlSafe,

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for &T

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for &mut T

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for Box<T>

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for Rc<T>

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for Arc<T>

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for Ref<'_, T>

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for RefMut<'_, T>

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for MutexGuard<'_, T>

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for RwLockReadGuard<'_, T>

Source§

impl<T: HtmlSafe + ?Sized> HtmlSafe for RwLockWriteGuard<'_, T>

Source§

impl<T: HtmlSafe> HtmlSafe for Wrapping<T>

Source§

impl<T: HtmlSafe> HtmlSafe for Pin<T>

Implementors§