The Standard Library as Architecture
Arcgives endpoint and connection handles shared ownership independent of any one future.Mutexserializes each protocol state machine while allowing handles on many executor threads.AtomicUsizedistinguishes public live handles from the driver itself.HashMap<StreamId, Waker>correlates readiness with exactly one blocked stream operation.Option<Waker>represents at most one driver notification claim.Pin<Box<dyn Future>>and trait objects erase runtime-specific timers and sockets at the narrow integration boundary.Bytesshares immutable packet/stream storage cheaply.- enums preserve transport, application, reset, closed, 0-RTT, and local-close errors as separate states.
The types make the protocol’s ownership graph visible: socket → endpoint → connection → stream, with wake paths traveling back upward only when needed.