🛈 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::service_span::Service

source ·
pub struct Service<S> { /* private fields */ }

Implementations§

source§

impl<S> Service<S>

source

pub fn new(inner: S, span: Span) -> Self

Trait Implementations§

source§

impl<S> Clone for Service<S>
where 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> Debug for Service<S>

source§

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

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

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

§

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

Responses given by the service.
§

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

Errors produced by the service.
§

type Future = <S as Service<R>>::Future

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, request: R) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<S> Freeze for Service<S>
where S: Freeze,

§

impl<S> !RefUnwindSafe for Service<S>

§

impl<S> Send for Service<S>
where S: Send,

§

impl<S> Sync for Service<S>
where S: Sync,

§

impl<S> Unpin for Service<S>
where S: Unpin,

§

impl<S> !UnwindSafe for Service<S>

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