[][src]Struct rocket_include_tera::TeraResponse

pub struct TeraResponse { /* fields omitted */ }

To respond HTML from Tera templates.

Methods

impl TeraResponse[src]

pub fn build_from_template<S: Into<String>, V: Serialize>(
    client_etag: EtagIfNoneMatch,
    etag: Option<EntityTag>,
    minify: bool,
    name: S,
    context: V
) -> Result<TeraResponse, SerdeJsonError>
[src]

Build a TeraResponse instance from a specific template.

pub fn build_from_cache<S: Into<String>>(
    client_etag: EtagIfNoneMatch,
    name: S
) -> TeraResponse
[src]

Build a TeraResponse instance from static cache.

impl TeraResponse[src]

pub fn fairing<F>(f: F) -> impl Fairing where
    F: Fn(&mut MutexGuard<ReloadableTera>) + Send + Sync + 'static, 
[src]

Create the fairing of TeraResponse.

impl TeraResponse[src]

pub fn get_html_and_etag(
    &self,
    cm: &TeraContextManager
) -> Result<(String, EntityTag), TeraError>
[src]

Get this response's HTML and Etag.

Trait Implementations

impl Debug for TeraResponse[src]

impl<'a> Responder<'a> for TeraResponse[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> IntoCollection<T> for T

impl<T, I> AsResult<T, I> for T where
    I: Input,