Struct RenderEndpoint

Source
pub struct RenderEndpoint<T, E> { /* private fields */ }
Expand description

The type of endpoint which renders a Tera template with the value of specified context type.

Trait Implementations§

Source§

impl<T: Debug, E: Debug> Debug for RenderEndpoint<T, E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, T, E, CtxT> Endpoint<'a> for RenderEndpoint<T, E>
where T: TemplateEngine + 'a, E: Endpoint<'a, Output = (CtxT,)>, CtxT: Serialize,

Source§

type Output = (Response<<T as TemplateEngine>::Body>,)

The inner type associated with this endpoint.
Source§

type Future = TemplateFuture<'a, T, E>

The type of value which will be returned from apply.
Source§

fn apply(&'a self, cx: &mut ApplyContext<'_>) -> ApplyResult<Self::Future>

Perform checking the incoming HTTP request and returns an instance of the associated Future if matched.
Source§

fn with_output<T>(self) -> Self
where T: Tuple, Self: Sized + Endpoint<'a, Output = T>,

Add an annotation that the associated type Output is fixed to T.
Source§

fn wrap<W>(self, wrapper: W) -> <W as Wrapper<'a, Self>>::Endpoint
where Self: Sized, W: Wrapper<'a, Self>,

Converts self using the provided Wrapper.

Auto Trait Implementations§

§

impl<T, E> !Freeze for RenderEndpoint<T, E>

§

impl<T, E> RefUnwindSafe for RenderEndpoint<T, E>

§

impl<T, E> Send for RenderEndpoint<T, E>
where E: Send, T: Send,

§

impl<T, E> Sync for RenderEndpoint<T, E>
where E: Sync, T: Sync,

§

impl<T, E> Unpin for RenderEndpoint<T, E>
where E: Unpin, T: Unpin,

§

impl<T, E> UnwindSafe for RenderEndpoint<T, E>
where E: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<'a, E> EndpointWrapExt<'a> for E
where E: Endpoint<'a>,

Source§

fn map<F>(self, f: F) -> <Map<Self::Output, F> as Wrapper<'a, Self>>::Endpoint
where F: Func<Self::Output> + 'a,

Source§

fn and_then<F>( self, f: F, ) -> <AndThen<Self::Output, F> as Wrapper<'a, Self>>::Endpoint
where F: Func<Self::Output> + 'a, <F as Func<Self::Output>>::Out: IntoFuture<Error = Error> + 'a,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, E> IntoEndpoint<'a> for E
where E: Endpoint<'a>,

Source§

type Output = <E as Endpoint<'a>>::Output

The inner type of associated Endpoint.
Source§

type Endpoint = E

The type of transformed Endpoint.
Source§

fn into_endpoint(self) -> <E as IntoEndpoint<'a>>::Endpoint

Consume itself and transform into an Endpoint.
Source§

impl<'a, E> IntoEndpointExt<'a> for E
where E: IntoEndpoint<'a>,

Source§

fn and<E>( self, other: E, ) -> And<Self::Endpoint, <E as IntoEndpoint<'a>>::Endpoint>
where E: IntoEndpoint<'a>, Self::Output: Combine<<E as IntoEndpoint<'a>>::Output>,

Create an endpoint which evaluates self and e and returns a pair of their tasks. Read more
Source§

fn or<E>( self, other: E, ) -> Or<Self::Endpoint, <E as IntoEndpoint<'a>>::Endpoint>
where E: IntoEndpoint<'a>,

Create an endpoint which evaluates self and e sequentially. Read more
Source§

fn or_strict<E>( self, other: E, ) -> OrStrict<Self::Endpoint, <E as IntoEndpoint<'a>>::Endpoint>
where E: IntoEndpoint<'a, Output = Self::Output>,

Create an endpoint which evaluates self and e sequentially. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.