[][src]Struct rocket_include_handlebars::HandlebarsResponse

pub struct HandlebarsResponse { /* fields omitted */ }

To respond HTML from Handlebars templates.

Methods

impl HandlebarsResponse[src]

pub fn build_from_template<V: Serialize>(
    minify: bool,
    name: &'static str,
    context: V
) -> Result<HandlebarsResponse, SerdeJsonError>
[src]

Build a HandlebarsResponse instance from a specific template.

pub fn build_from_cache<S: Into<Arc<str>>>(name: S) -> HandlebarsResponse[src]

Build a HandlebarsResponse instance from cache.

impl HandlebarsResponse[src]

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

Create the fairing of HandlebarsResponse.

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

Create the fairing of HandlebarsResponse and set the cache capacity.

impl HandlebarsResponse[src]

pub fn get_html_and_etag(
    &self,
    cm: &HandlebarsContextManager
) -> Result<(Arc<str>, Arc<EntityTag>), RenderError>
[src]

Get this response's HTML and Etag.

pub fn get_html(
    &self,
    cm: &HandlebarsContextManager
) -> Result<String, RenderError>
[src]

Get this response's HTML.

Trait Implementations

impl Debug for HandlebarsResponse[src]

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

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

impl<T> IntoCollection<T> for T

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> Typeable for T where
    T: Any