Struct Layered
pub struct Layered<L, H, T, S> { /* private fields */ }
A Service created from a Handler by applying a Tower middleware.
Created with Handler::layer. See that method for more details.
Trait Implementations
impl<H, S, T, L> Handler<T, S> for Layered<L, H, T, S>
where
L: Layer<HandlerService<H, T, S>> + Clone + Send + Sync + 'static,
H: Handler<T, S>,
L::Service: Service<Request, Error = Infallible> + Clone + Send + 'static,
<L::Service as Service<Request>>::Response: IntoResponse,
<L::Service as Service<Request>>::Future: Send,
T: 'static,
S: 'static,
type Future = LayeredFuture<<L as Layer<HandlerService<H, T, S>>>::Service>;fn call(self, req: Request, state: S) -> Self::Future
impl<L, H, T, S> Clone for Layered<L, H, T, S>
where
L: Clone,
H: Clone,
fn clone(&self) -> Self
impl<L, H, T, S> Debug for Layered<L, H, T, S>
where
L: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl<L, H, T, S> Freeze for Layered<L, H, T, S>
where
L: Freeze,
H: Freeze,
PhantomData<fn() -> (T, S)>: Freeze,
impl<L, H, T, S> RefUnwindSafe for Layered<L, H, T, S>
where
L: RefUnwindSafe,
H: RefUnwindSafe,
PhantomData<fn() -> (T, S)>: RefUnwindSafe,
impl<L, H, T, S> Send for Layered<L, H, T, S>
where
L: Send,
H: Send,
PhantomData<fn() -> (T, S)>: Send,
impl<L, H, T, S> Sync for Layered<L, H, T, S>
where
L: Sync,
H: Sync,
PhantomData<fn() -> (T, S)>: Sync,
impl<L, H, T, S> Unpin for Layered<L, H, T, S>
where
L: Unpin,
H: Unpin,
PhantomData<fn() -> (T, S)>: Unpin,
impl<L, H, T, S> UnsafeUnpin for Layered<L, H, T, S>
where
L: UnsafeUnpin,
H: UnsafeUnpin,
PhantomData<fn() -> (T, S)>: UnsafeUnpin,
impl<L, H, T, S> UnwindSafe for Layered<L, H, T, S>
where
L: UnwindSafe,
H: UnwindSafe,
PhantomData<fn() -> (T, S)>: UnwindSafe,
Blanket Implementations
impl<H, T> HandlerWithoutStateExt<T> for Layered<L, H, T, S>
where
H: Handler<T, ()>,
fn into_service(self) -> HandlerService<H, T, ()>fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>fn into_make_service_with_connect_info<C>(self) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Layered<L, H, T, S>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Layered<L, H, T, S>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for Layered<L, H, T, S>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Layered<L, H, T, S>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Layered<L, H, T, S>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Layered<L, H, T, S>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Layered<L, H, T, S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> FromRef<T> for Layered<L, H, T, S>
where
T: Clone,
fn from_ref(input: &T) -> T
impl<T> Instrument for Layered<L, H, T, S>
impl<T> Read<Exclusive, BecauseExclusive> for Layered<L, H, T, S>
where
T: ?Sized,
impl<T> Same for Layered<L, H, T, S>
type Output = T;
impl<T> ToOwned for Layered<L, H, T, S>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for Layered<L, H, T, S>
impl<T, U> Into<U> for Layered<L, H, T, S>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Layered<L, H, T, S>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Layered<L, H, T, S>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip<V> for Layered<L, H, T, S>
where
V: MultiLane<T>,
fn vzip(self) -> V