pub struct MakeService<M, T, R, G = fn(_: &T) -> Span>where
G: GetSpan<T>,{ /* private fields */ }
Available on crate feature
tower-layer
only.Implementations§
Trait Implementations§
Source§impl<M, T, R, G> Clone for MakeService<M, T, R, G>
impl<M, T, R, G> Clone for MakeService<M, T, R, G>
Source§impl<M, T, R, G> Service<T> for MakeService<M, T, R, G>where
M: MakeService<T, R>,
G: GetSpan<T>,
impl<M, T, R, G> Service<T> for MakeService<M, T, R, G>where
M: MakeService<T, R>,
G: GetSpan<T>,
Source§type Error = <M as MakeService<T, R>>::MakeError
type Error = <M as MakeService<T, R>>::MakeError
Errors produced by the service.
Source§type Future = MakeFuture<<M as MakeService<T, R>>::Future>
type Future = MakeFuture<<M as MakeService<T, R>>::Future>
The future response value.
Auto Trait Implementations§
impl<M, T, R, G> Freeze for MakeService<M, T, R, G>
impl<M, T, R, G> RefUnwindSafe for MakeService<M, T, R, G>where
G: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, T, R, G> Send for MakeService<M, T, R, G>
impl<M, T, R, G> Sync for MakeService<M, T, R, G>
impl<M, T, R, G> Unpin for MakeService<M, T, R, G>
impl<M, T, R, G> UnwindSafe for MakeService<M, T, R, G>where
G: UnwindSafe,
M: 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<S, R> InstrumentableService<R> for Swhere
S: Service<R>,
impl<S, R> InstrumentableService<R> for Swhere
S: Service<R>,
fn instrument<G>(self, svc_span: G) -> InstrumentedService<Self, Request>
fn trace_requests<G>(self, get_span: G) -> Service<Self, Request, G>
fn trace_service<G>(self, get_span: G) -> Service<Self>where
G: GetSpan<Self>,
Source§impl<M, S, Target, Request> MakeService<Target, Request> for Mwhere
M: Service<Target, Response = S>,
S: Service<Request>,
impl<M, S, Target, Request> MakeService<Target, Request> for Mwhere
M: Service<Target, Response = S>,
S: Service<Request>,
Source§fn poll_ready(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
fn poll_ready( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
Returns
Ready
when the factory is able to create more services. Read moreSource§fn make_service(
&mut self,
target: Target,
) -> <M as MakeService<Target, Request>>::Future
fn make_service( &mut self, target: Target, ) -> <M as MakeService<Target, Request>>::Future
Create and return a new service value asynchronously.