Improve the layout of crate exports; add runtime convenience functions
This commit addresses multiple problems highlighted by #182 (closed):
-
arti-client
had 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
DataReader
andDataWriter
were cleaned up to be of better quality, now that they're public.
- In addition, the doc comments for
- It was impossible to use
arti-client
without also importingtor-rtcompat
. This is now fixed by the addition of two convenience methods:TorClient::bootstrap_with_tokio
andTorClient::bootstrap_with_async_std
. - Potentially controversially:
tor-rtcompat
now returns concrete types from methods likecurrent_runtime
, instead ofimpl Runtime
.- This was needed in order to actually be able to name the
TorClient
type 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