🛈 Note: This is pre-release documentation for the upcoming tracing 0.2.0 ecosystem.

For the release documentation, please see docs.rs, instead.

Struct tracing_tower::request_span::make::MakeService

source ·
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>
where G: GetSpan<R> + Clone,

source

pub fn new<T>(inner: S, get_span: G) -> Self
where S: MakeService<T, R>,

Trait Implementations§

source§

impl<S, R, G> Clone for MakeService<S, R, G>
where G: GetSpan<R> + Clone, S: Clone,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<S: Debug, R: Debug, G: Debug> Debug for MakeService<S, R, G>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S, R, G, T> Service<T> for MakeService<S, R, G>
where S: MakeService<T, R>, G: GetSpan<R> + Clone,

§

type Response = Service<<S as MakeService<T, R>>::Service, R, G>

Responses given by the service.
§

type Error = <S as MakeService<T, R>>::MakeError

Errors produced by the service.
§

type Future = MakeFuture<<S as MakeService<T, R>>::Future, R, G>

The future response value.
source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
source§

fn call(&mut self, target: T) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<S, R, G> Freeze for MakeService<S, R, G>
where G: Freeze, S: Freeze,

§

impl<S, R, G> RefUnwindSafe for MakeService<S, R, G>

§

impl<S, R, G> Send for MakeService<S, R, G>
where G: Send, S: Send,

§

impl<S, R, G> Sync for MakeService<S, R, G>
where G: Sync, S: Sync,

§

impl<S, R, G> Unpin for MakeService<S, R, G>
where G: Unpin, S: Unpin,

§

impl<S, R, G> UnwindSafe for MakeService<S, R, G>
where G: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<S, R> InstrumentableService<R> for S
where S: Service<R>,

source§

fn instrument<G>(self, svc_span: G) -> InstrumentedService<Self, Request>
where G: GetSpan<Self>, Request: Debug,

source§

fn trace_requests<G>(self, get_span: G) -> Service<Self, Request, G>
where G: GetSpan<Request> + Clone,

source§

fn trace_service<G>(self, get_span: G) -> Service<Self>
where G: GetSpan<Self>,

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<M, S, Target, Request> MakeService<Target, Request> for M
where M: Service<Target, Response = S>, S: Service<Request>,

§

type Response = <S as Service<Request>>::Response

Responses given by the service
§

type Error = <S as Service<Request>>::Error

Errors produced by the service
§

type Service = S

The Service value created by this factory
§

type MakeError = <M as Service<Target>>::Error

Errors produced while building a service.
§

type Future = <M as Service<Target>>::Future

The future of the Service instance.
source§

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 more
source§

fn make_service( &mut self, target: Target ) -> <M as MakeService<Target, Request>>::Future

Create and return a new service value asynchronously.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithCollector for T

source§

fn with_collector<C>(self, collector: C) -> WithDispatch<Self>
where C: Into<Dispatch>,

Attaches the provided collector to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_collector(self) -> WithDispatch<Self>

Attaches the current default collector to this type, returning a WithDispatch wrapper. Read more