Improve the layout of crate exports; add runtime convenience functions
This commit addresses multiple problems highlighted by #182 (closed):
-
arti-clienthad some types in its public API that weren't accessible without importing another crate (CfgPath,DataReader,DataWriter). This has been fixed.- In addition, the doc comments for
DataReaderandDataWriterwere cleaned up to be of better quality, now that they're public.
- In addition, the doc comments for
- It was impossible to use
arti-clientwithout also importingtor-rtcompat. This is now fixed by the addition of two convenience methods:TorClient::bootstrap_with_tokioandTorClient::bootstrap_with_async_std. - Potentially controversially:
tor-rtcompatnow returns concrete types from methods likecurrent_runtime, instead ofimpl Runtime.- This was needed in order to actually be able to name the
TorClienttype that results from using these methods. - This does mean we lose API flexibility, but on balance I think this is a good thing, because the API we do have is actually usable...
- This was needed in order to actually be able to name the