hclient_rt/lib.rs
1//! Runtime capabilities for hclient's native transport.
2//!
3//! Separate traits rather than one `Runtime`: the transport demands only
4//! what it uses, and a backend without sockets isn't forced to implement
5//! `connect` with a stub that panics.
6#![forbid(unsafe_code)]
7
8mod caps;
9mod futures_io;
10mod udp;
11
12pub use caps::{
13 Blocking, Cancelled, Spawn, TcpAdoptStd, TcpConnect, TcpOpts, TcpOptsSupport,
14 UnixSocketsUnsupported, UnsupportedTcpOpts,
15};
16pub use futures_io::FuturesIo;
17pub use udp::{
18 Datagrams, EcnCodepoint, RecvMeta, UdpAdoptStd, UdpBind, UdpCaps, UdpDatagrams,
19 UnsupportedUdpOffload,
20};
21
22/// `Timer` is defined once, in `hclient-core`: the portable core needs it
23/// for timeouts and backoff. This is just a re-export.
24///
25/// `Discard` comes with it: `Timer::Sleep` is a named associated type, and
26/// a runtime whose native timer resolves to something other than `()` — as
27/// `async_io::Timer` does — needs the adapter to satisfy it. Re-exported
28/// here so a runtime crate does not have to depend on `hclient-core`
29/// directly just to name one wrapper.
30pub use hclient_core::unversioned::{Discard, Timer};