pub struct MakeService<S, R, G = fn(_: &R) -> Span> { /* private fields */ }
Available on crate feature
tower-make
only.Implementations§
Source§impl<S, R, G> MakeService<S, R, G>
impl<S, R, G> MakeService<S, R, G>
pub fn new<T>(inner: S, get_span: G) -> Selfwhere
S: MakeService<T, R>,
Trait Implementations§
Source§impl<S, R, G> Clone for MakeService<S, R, G>
impl<S, R, G> Clone for MakeService<S, R, G>
Source§impl<S, R, G, T> Service<T> for MakeService<S, R, G>
impl<S, R, G, T> Service<T> for MakeService<S, R, G>
Source§type Response = Service<<S as MakeService<T, R>>::Service, R, G>
type Response = Service<<S as MakeService<T, R>>::Service, R, G>
Responses given by the service.
Source§type Error = <S as MakeService<T, R>>::MakeError
type Error = <S as MakeService<T, R>>::MakeError
Errors produced by the service.
Source§type Future = MakeFuture<<S as MakeService<T, R>>::Future, R, G>
type Future = MakeFuture<<S as MakeService<T, R>>::Future, R, G>
The future response value.
Auto Trait Implementations§
impl<S, R, G> Freeze for MakeService<S, R, G>
impl<S, R, G> RefUnwindSafe for MakeService<S, R, G>where
G: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, R, G> Send for MakeService<S, R, G>
impl<S, R, G> Sync for MakeService<S, R, G>
impl<S, R, G> Unpin for MakeService<S, R, G>
impl<S, R, G> UnwindSafe for MakeService<S, R, G>where
G: UnwindSafe,
S: 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.