mirror of
https://github.com/rustls/rustls.git
synced 2026-10-28 17:56:30 +08:00
This changes `Connection` into a trait rather than enum, and ensures that `ClientConnection` and `ServerConnection` impls it. This removes `ConnectionCommon` and `CommonState` derefs, and allows those types to become private. The `Deref` to `ConnectionOutputs` is maintained. This becomes important later, because the use of Deref commits us to using those parts for the internal representation of (eg) a `ClientConnection`. This comes with the pain that `use rustls::Connection` is needed for most users.