pub enum EarlyDataSupport {
None,
Supported,
}Expand description
Whether a transport can put a request into TLS 1.3 early data (0-RTT).
§This is the floor, and it says less than it looks like
Self::Supported means only “this transport is able to offer early
data”. It never means a particular request went into early data, and it
never means one was accepted. In QUIC the acceptance verdict arrives
after the response — measured at 8.63 ms against a response at
8.58 ms — so it is a future, not a
property of a transport, and nothing about it can live in a value that
Transport::capabilities
determines once at construction.
§Why the default is None with unusual force
Every other capability here follows the rule that a default must not be
stronger than the truth, and the cost of breaking it is a buffered copy,
a lost optimisation, or — for full_duplex — a deadlock. This one costs
replay exposure: early data is data an attacker who captured it can
send again, at a moment of their choosing, to a server that will act on
it. So Capabilities::default() reports None, every transport that
ships today reports None, and a transport that forgets this field
reports None.
§Reporting Supported is not sufficient to put anything in early data
It is necessary and nothing more. The gate is the caller’s, per request
— see AllowEarlyData — and a transport that reports Supported must
still refuse to place a request the caller did not mark.
Variants§
None
This transport never offers early data. The conservative base, what
Capabilities::default() returns, and the honest answer for every
transport in this workspace except hclient-h3.
Supported
This transport can offer early data for a request the caller has
marked with AllowEarlyData. See this enum’s doc for the three
things it still does not mean.
Trait Implementations§
Source§impl Clone for EarlyDataSupport
impl Clone for EarlyDataSupport
Source§fn clone(&self) -> EarlyDataSupport
fn clone(&self) -> EarlyDataSupport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more