pub struct StaticTemplate(pub &'static str);Tuple Fields§
§0: &'static strImplementations§
Source§impl StaticTemplate
impl StaticTemplate
pub fn into_with_context<S>(self, context: Value) -> MethodRouter<S>
Trait Implementations§
Source§impl Clone for StaticTemplate
impl Clone for StaticTemplate
Source§fn clone(&self) -> StaticTemplate
fn clone(&self) -> StaticTemplate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticTemplate
impl Debug for StaticTemplate
Source§impl<S> From<StaticTemplate> for MethodRouter<S>
impl<S> From<StaticTemplate> for MethodRouter<S>
Source§fn from(val: StaticTemplate) -> Self
fn from(val: StaticTemplate) -> Self
Converts to this type from the input type.
Source§impl<T, S> Handler<T, S> for StaticTemplate
impl<T, S> Handler<T, S> for StaticTemplate
Source§type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>
type Future = Pin<Box<dyn Future<Output = Response<Body>> + Send>>
The type of future calling this handler returns.
Source§fn call(self, request: Request, state: S) -> Self::Future
fn call(self, request: Request, state: S) -> Self::Future
Call the handler with the given request.
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
Apply a
tower::Layer to the handler. Read moreSource§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Convert the handler into a
Service by providing the stateAuto Trait Implementations§
impl Freeze for StaticTemplate
impl RefUnwindSafe for StaticTemplate
impl Send for StaticTemplate
impl Sync for StaticTemplate
impl Unpin for StaticTemplate
impl UnsafeUnpin for StaticTemplate
impl UnwindSafe for StaticTemplate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more