Skip to main content

EarlyDataSupport

Enum EarlyDataSupport 

Source
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

Source§

fn clone(&self) -> EarlyDataSupport

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for EarlyDataSupport

Source§

impl Debug for EarlyDataSupport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EarlyDataSupport

Source§

fn default() -> EarlyDataSupport

Returns the “default value” for a type. Read more
Source§

impl Eq for EarlyDataSupport

Source§

impl PartialEq for EarlyDataSupport

Source§

fn eq(&self, other: &EarlyDataSupport) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EarlyDataSupport

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.