Trait AutoEscape

Source
pub trait AutoEscape {
    type Escaped: Display;
    type Error: Into<Error>;

    // Required method
    fn askama_auto_escape(&self) -> Result<Self::Escaped, Self::Error>;
}
Expand description

Used internally by askama to select the appropriate escaper

Required Associated Types§

Source

type Escaped: Display

The wrapped or converted result type

Source

type Error: Into<Error>

Early error testing for the input value, usually Infallible

Required Methods§

Source

fn askama_auto_escape(&self) -> Result<Self::Escaped, Self::Error>

Used internally by askama to select the appropriate escaper

Implementors§

Source§

impl<'a, T: Display + ?Sized, E: Escaper> AutoEscape for &&AutoEscaper<'a, T, E>

Use the provided escaper

Source§

type Escaped = EscapeDisplay<&'a T, E>

Source§

type Error = Infallible

Source§

impl<'a, T: Display, E> AutoEscape for &AutoEscaper<'a, &&&Safe<T>, E>

Source§

impl<'a, T: Display, E> AutoEscape for &AutoEscaper<'a, &&Safe<T>, E>

Source§

impl<'a, T: Display, E> AutoEscape for &AutoEscaper<'a, &Safe<T>, E>

Source§

impl<'a, T: Display, E> AutoEscape for &AutoEscaper<'a, Safe<T>, E>

Source§

impl<'a, T: Display, E: Escaper> AutoEscape for &AutoEscaper<'a, &&&MaybeSafe<T>, E>

Source§

type Escaped = Wrapped<'a, T, E>

Source§

type Error = Infallible

Source§

impl<'a, T: Display, E: Escaper> AutoEscape for &AutoEscaper<'a, &&MaybeSafe<T>, E>

Source§

type Escaped = Wrapped<'a, T, E>

Source§

type Error = Infallible

Source§

impl<'a, T: Display, E: Escaper> AutoEscape for &AutoEscaper<'a, &MaybeSafe<T>, E>

Source§

type Escaped = Wrapped<'a, T, E>

Source§

type Error = Infallible

Source§

impl<'a, T: Display, E: Escaper> AutoEscape for &AutoEscaper<'a, MaybeSafe<T>, E>

Source§

type Escaped = Wrapped<'a, T, E>

Source§

type Error = Infallible

Source§

impl<'a, T: HtmlSafe + ?Sized> AutoEscape for &AutoEscaper<'a, T, Html>

Don’t escape HTML safe types