pub trait InspectExt: Future + Sized {
// Provided methods
fn inspect(self, name: impl Into<String>) -> TrackedFuture<Self> ⓘ { ... }
fn spawn_tracked(self, name: impl Into<String>) -> Task<Self::Output>
where Self: Send + 'static,
Self::Output: Send + 'static { ... }
}Expand description
Extension trait for smol futures to add tracking
§Examples
use async_inspect::runtime::smol::InspectExt;
smol::block_on(async {
let result = async {
// Your async code
42
}
.inspect("my_operation")
.await;
});Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.