pub fn trace<S, U, F>(
    service_factory: U,
    make_span: F,
) -> ApplyTransform<TracingTransform<S::Service, S, F>, S>
where
    S: ServiceFactory,
    F: Fn(&S::Request) -> Option<tracing::Span> + Clone,
    U: IntoServiceFactory<S>,
{
    apply(
        TracingTransform::new(make_span),
        service_factory.into_factory(),
    )
}
/// Wraps the provided service factory with a transform that automatically
/// enters/exits the given span.
///
/// The span to be entered/exited can be provided via a closure. The closure
/// is passed in a reference to the request being handled by the service.
///
/// For example:
/// ```rust,ignore
/// let traced_service = trace(
///     web_service,
///     |req: &Request| Some(span!(Level::INFO, "request", req.id))
/// );
/// ```
Wraps the provided service factory with a transform that automatically
enters/exits the given span.

The span to be entered/exited can be provided via a closure. The closure
is passed in a reference to the request being handled by the service.


Wraps the provided service factory with a transform that automatically enters / exits the given span . The span to be entered / exited can be provided via a closure . The closure is passed in a reference to the request being handled by the service .
pub fn trace<S, U, F>(
    service_factory: U,
    make_span: F,
) -> ApplyTransform<TracingTransform<S::Service, S, F>, S>
where
    S: ServiceFactory,
    F: Fn(&S::Request) -> Option<tracing::Span> + Clone,
    U: IntoServiceFactory<S>,
{
    apply(
        TracingTransform::new(make_span),
        service_factory.into_factory(),
    )
}
pub fn trace < S , U , F > ( service_factory : U , make_span : F , ) -> ApplyTransform < TracingTransform < S :: Service , S , F > , S > where S : ServiceFactory , F : Fn ( & S :: Request ) -> Option < tracing :: Span > + Clone , U : IntoServiceFactory < S > , { apply ( TracingTransform :: new ( make_span ) , service_factory . into_factory ( ) , ) }
Wraps the provided service factory with a transform that automatically
enters/exits the given span.
Wraps the provided service factory with a transform that automatically enters / exits the given span .
service_factory
U
make_span
F