[−][src]Struct rocket_include_tera::TeraResponse
To respond HTML from Tera templates.
Methods
impl TeraResponse
[src]
pub fn build_from_template<V: Serialize>(
minify: bool,
name: &'static str,
context: V
) -> Result<TeraResponse, SerdeJsonError>
[src]
minify: bool,
name: &'static str,
context: V
) -> Result<TeraResponse, SerdeJsonError>
Build a TeraResponse
instance from a specific template.
pub fn build_from_cache<S: Into<Arc<str>>>(name: S) -> TeraResponse
[src]
Build a TeraResponse
instance from cache.
impl TeraResponse
[src]
pub fn fairing<F>(f: F) -> impl Fairing where
F: Fn(&mut MutexGuard<ReloadableTera>) + Send + Sync + 'static,
[src]
F: Fn(&mut MutexGuard<ReloadableTera>) + Send + Sync + 'static,
Create the fairing of TeraResponse
.
pub fn fairing_cache<F>(f: F) -> impl Fairing where
F: Fn(&mut MutexGuard<ReloadableTera>) -> usize + Send + Sync + 'static,
[src]
F: Fn(&mut MutexGuard<ReloadableTera>) -> usize + Send + Sync + 'static,
Create the fairing of TeraResponse
.
impl TeraResponse
[src]
pub fn get_html_and_etag(
&self,
cm: &TeraContextManager
) -> Result<(Arc<str>, Arc<EntityTag>), TeraError>
[src]
&self,
cm: &TeraContextManager
) -> Result<(Arc<str>, Arc<EntityTag>), TeraError>
Get this response's HTML and Etag.
pub fn get_html(&self, cm: &TeraContextManager) -> Result<String, TeraError>
[src]
Get this response's HTML.
Trait Implementations
impl Debug for TeraResponse
[src]
impl<'a> Responder<'a> for TeraResponse
[src]
fn respond_to(self, request: &Request) -> Result<'a>
[src]
Auto Trait Implementations
impl Send for TeraResponse
impl Unpin for TeraResponse
impl Sync for TeraResponse
impl UnwindSafe for TeraResponse
impl RefUnwindSafe for TeraResponse
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,