Skip to content

tor-proto: implement tokio Async{Read, Write} traits conditionally

eta requested to merge eta/arti:eta/tor-proto-tokio into main

futures::io::AsyncRead (and Write) isn't the same thing as tokio::io::AsyncRead, which is a somewhat annoying misfeature of the Rust async ecosystem (!).

To mitigate this somewhat for people trying to use the DataStream struct with tokio, implement the tokio versions of the above traits using tokio-util's compat layer, if a crate feature (tokio) is enabled.

depends on !96 (closed)

Merge request reports