tokio/future/
trace.rs

1use std::future::Future;
2
3pub(crate) trait InstrumentedFuture: Future {
4    fn id(&self) -> Option<tracing::Id>;
5}
6
7impl<F: Future> InstrumentedFuture for tracing::instrument::Instrumented<F> {
8    fn id(&self) -> Option<tracing::Id> {
9        self.span().id()
10    }
11}