enum DraftSource {
Fallback,
Offered,
Selected,
Alpn,
}Expand description
Where a session’s draft came from, ranked by how much it is worth.
A later answer replaces an earlier one only if it outranks it, which is what makes the order here the whole policy and keeps it in one place.
Variants§
Fallback
Nobody named a draft, so the session kept the one it was configured
for. Two things produce it: DRAFT_SETTLE_WINDOW expiring, and a
control stream whose first message is readable enough to say it is
not a SETUP — in both cases there is nothing to learn from and the
tasks waiting on an answer are better off with the starting draft
than with the wait.
The lowest rank, because it is not an answer at all: it is the absence of one, and a SETUP that turns up afterwards — on this direction or the other — must still be able to replace it.
Offered
The highest draft in the moq-00 cohort that CLIENT_SETUP offered.
An offer rather than an agreement: a server is free to select a lower
version out of the same list.
Selected
The version SERVER_SETUP selected. This is the one the two peers are actually speaking, so it outranks the client’s offer.
Alpn
The ALPN, which names exactly one draft from 15 on and is known before a byte is read. Nothing can improve on it, so it outranks everything and the session never waits.
Trait Implementations§
Source§impl Clone for DraftSource
impl Clone for DraftSource
Source§fn clone(&self) -> DraftSource
fn clone(&self) -> DraftSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more