pub struct Layered<L, J, T, Ctx> { /* private fields */ }
Expand description
A Service
created from a Job
by applying a Tower middleware.
Created with Job::layer
. See that method for more details.
Trait Implementations§
Source§impl<L, J, Ctx, T> Job<T, Ctx> for Layered<L, J, T, Ctx>
impl<L, J, Ctx, T> Job<T, Ctx> for Layered<L, J, T, Ctx>
Source§type Future = LayeredFuture<<L as Layer<JobService<J, T, Ctx>>>::Service>
type Future = LayeredFuture<<L as Layer<JobService<J, T, Ctx>>>::Service>
The type of future calling this job returns.
Source§fn call(self, call: JobCall, context: Ctx) -> Self::Future
fn call(self, call: JobCall, context: Ctx) -> Self::Future
Call the job with the given request.
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, Ctx>
fn layer<L>(self, layer: L) -> Layered<L, Self, T, Ctx>
Apply a
tower::Layer
to the job. Read moreSource§fn with_context(self, ctx: Ctx) -> JobService<Self, T, Ctx>
fn with_context(self, ctx: Ctx) -> JobService<Self, T, Ctx>
Convert the job into a
Service
by providing the contextAuto Trait Implementations§
impl<L, J, T, Ctx> Freeze for Layered<L, J, T, Ctx>
impl<L, J, T, Ctx> RefUnwindSafe for Layered<L, J, T, Ctx>where
L: RefUnwindSafe,
J: RefUnwindSafe,
impl<L, J, T, Ctx> Send for Layered<L, J, T, Ctx>
impl<L, J, T, Ctx> Sync for Layered<L, J, T, Ctx>
impl<L, J, T, Ctx> Unpin for Layered<L, J, T, Ctx>
impl<L, J, T, Ctx> UnwindSafe for Layered<L, J, T, Ctx>where
L: UnwindSafe,
J: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<H, T> JobWithoutContextExt<T> for H
impl<H, T> JobWithoutContextExt<T> for H
Source§fn into_service(self) -> JobService<H, T, ()>
fn into_service(self) -> JobService<H, T, ()>
Convert the handler into a
Service
and no context.