Trait askama::filters::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