tracing/tracing-futures
Naja Melan 30e2cfb7bf
futures: Add Instrumented and WithDispatch ::{inner_pin_ref, inner_pin_mut} (#590)
Adds the possibility for the client code to access a pinned projection
of the wrapped types in `Instrumented` and `WithDispatch`. As suggested
in #386.

I added this after seeing the suggestion, it compiles fine, but be
warned I have not actually tried to use this for anything. Let me know
if you want to see any tests added.

The main thing I see this enabling is calling `poll` directly on a
wrapped future, which would disable the functionality from the wrappers.
I'm not sure of the use case, but that's not a reason to make it
impossible I suppose.

I got stuck a bit wondering how sound it is to give access to both a
`&mut` and a `Pin<&mut>` for the same field, but haven't been able to
find any way to break anything without unsafe code.
2020-02-17 13:01:00 -08:00
..

tracing-futures

Utilities for instrumenting futures-based code with tracing.

Crates.io Documentation Documentation (master) MIT licensed Build Status Discord chat maintenance status

Documentation | Chat

Overview

tracing is a framework for instrumenting Rust programs to collect structured, event-based diagnostic information. This crate provides utilities for using tracing to instrument asynchronous code written using futures and async/await.

The crate provides the following traits:

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tracing by you, shall be licensed as MIT, without any additional terms or conditions.