summaryrefslogtreecommitdiff
path: root/crates/tor-rtcompat/src/compound.rs
Commit message (Collapse)AuthorAgeFilesLines
* rt-compat: Make all the individual runtime traits Clone+Send etc.Ian Jackson2022-06-081-0/+11
| | | | | | | | This will make it much more convenient for code that only wants one of these traits (or a subset of them). This is a good thing to support because it will allow us to use a ZST in places that do not need an actual async runtime handle (typically, the runtime handle is needed only for spawn).
* tor-rtcompat: make CompoundRuntime handle SleepProviders properlyeta2022-05-101-0/+11
| | | | | | Previously, CompoundRuntime would use the default implementations of SleepProvider::now() and ::wallclock(), instead of using its wrapped SleepProvider. This mildly embarrassing omission has been rectified.
* add udp to runtimetrinity-1686a2022-03-141-11/+39
|
* Replace manual Clone impl with educe in tor-rtcompatIan Jackson2022-03-021-10/+3
|
* tor-rtcompat: Provide TLS wrapping for all streamsIan Jackson2022-02-241-3/+2
| | | | | | | | Now all of the runtime types we provide all impl<S> TlsProvider<S> where S: ... rather than merely TlsProvider<Self::TcpStream>. And we document and intent to perhaps require this in the future.
* Rename `SpawnBlocking` trait to `BlockOn`.Nick Mathewson2022-01-261-4/+4
| | | | | This avoids a future confusion with the new `SpawnBlocking` trait in async_executors v0.5, and better describes what the trait provides.
* Limit the inner types in tor-rtcompat that have to implement CloneNick Mathewson2022-01-261-1/+10
| | | | | If we implement our own clone on CompoundRuntime, we no longer need Clone implementations on our TlsProvider implementations.
* Add a CompoundRuntime type for runtime construction.Nick Mathewson2022-01-191-0/+131
This type can solve two problems at once. First, it lets users replace parts of an existing runtime implementation without replacing the whole thing. For example, you can use it to override your TcpProvider implementation to solve problems like #235. Second, we can use it internally to tor-rtcompat to define Runtimes piece-by-piece. Mostly we'll use this to separate our Tls implementations from our implementations of the rest of the Runtime.