Expand description
Runtime capabilities for hclient’s native transport.
Separate traits rather than one Runtime: the transport demands only
what it uses, and a backend without sockets isn’t forced to implement
connect with a stub that panics.
Structs§
- Cancelled
- The background thread pool that
Blocking::runwas supposed to run on went away before the task got to start — for example, the runtime is shutting down while the task is still queued. No payload: this is not a failure off(fnever ran at all), but a signal from the runtime that there will be no result. - Datagrams
- One send: a destination, and between one and many datagrams.
- Discard
Timeris defined once, inhclient-core: the portable core needs it for timeouts and backoff. This is just a re-export.- Futures
Io - Bridges
futures_io::{AsyncRead, AsyncWrite}→hyper::rt::{Read, Write}. - Recv
Meta - What one
UdpDatagrams::poll_recvslot received. - TcpOpts
- Socket options are applied in hclient once, on the
socket2::Socket, and the runtime only adopts the descriptor (TcpAdoptStd). Otherwise every runtime crate would rewrite this whole rigmarole again. - TcpOpts
Support - Which of
TcpOpts’ six fields a runtime can actually apply. - UdpCaps
- Which offloads a socket has.
- Unix
Sockets Unsupported - A runtime that declares no Unix-domain support was asked for a connection to one.
- Unsupported
TcpOpts - The caller set socket options this runtime cannot apply.
- Unsupported
UdpOffload - The caller asked for an offload this socket does not have.
Enums§
- EcnCodepoint
- An ECN codepoint, in the two bits of the IP header’s TOS/traffic-class field that carry it.
Traits§
- Blocking
- A separate trait, not a method:
getaddrinfoblocks, and wasm and embedded have no blocking pool at all. The absence of the capability must be a compile error, not anunimplemented!()in the runtime. - Spawn
- The shape is deliberately copied from
hyper::rt::Executor: generic over the future, zero bounds in the declaration.Sendis added by theimpl, not the trait, so single-threaded runtimes can implement it honestly. - TcpAdopt
Std - On platforms with file descriptors, the whole set of socket options is applied outside the runtime, and the runtime only adopts the finished socket.
- TcpConnect
- Timer
Timeris defined once, inhclient-core: the portable core needs it for timeouts and backoff. This is just a re-export.- UdpAdopt
Std - Adopt an already-created
std::net::UdpSocket. - UdpBind
- Bind a UDP socket.
- UdpDatagrams
- Datagram I/O on a bound socket.