pub enum Event<'a> {
Connected(Connected<'a>),
Reused(Reused<'a>),
Head(Head<'a>),
Closed(Closed<'a>),
Informational(Informational<'a>),
}Expand description
What a transport reports.
Not #[non_exhaustive], for Message’s reason (see
Message): nothing here is published,
so a new variant costs a rebase inside this workspace, and a compile
error is what an implementer of Hooks should get when the
vocabulary grows — rather than a silently ignored fact.
There is deliberately no “request queued” variant. The original
list for this work had one, and hclient-native has nothing to put in
it: a request that finds no live pooled connection dials a fresh one,
there is no per-origin connection limit to wait behind, and an h2
connection is checked out of the pool exclusively — one stream at a
time — so SendRequest::poll_ready never waits for a stream of ours.
A variant no code can emit is a capability that lies; this one belongs
here once a backend has a queue.
Variants§
Connected(Connected<'a>)
A connection was made. See Connected for what each duration
means and, more to the point, what it does not.
Reused(Reused<'a>)
A connection somebody else already made is being used again.
Head(Head<'a>)
The response head arrived.
Closed(Closed<'a>)
A connection ended, and why.
Informational(Informational<'a>)
A 1xx arrived ahead of the response — 100 Continue,
103 Early Hints, or anything else a server sends before the one
answer the caller is waiting for.
An event rather than a response, because it is not one: a 1xx is
not the end of the exchange and Transport::execute resolves
exactly once. A caller who wants 103’s preload hints reads them
here, before the head that follows.