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