pub enum Event {
    Headers {
        list: Vec<Header>,
        has_body: bool,
    },
    Data,
    Finished,
    Reset(u64),
    Datagram,
    PriorityUpdate,
    GoAway,
}
Expand description

An HTTP/3 connection event.

Variants

Headers

Fields

list: Vec<Header>

The list of received header fields. The application should validate pseudo-headers and headers.

has_body: bool

Whether data will follow the headers on the stream.

Request/response headers were received.

Data

Data was received.

This indicates that the application can use the recv_body() method to retrieve the data from the stream.

Note that recv_body() will need to be called repeatedly until the Done value is returned, as the event will not be re-armed until all buffered data is read.

Finished

Stream was closed,

Reset(u64)

Stream was reset.

The associated data represents the error code sent by the peer.

Datagram

DATAGRAM was received.

This indicates that the application can use the recv_dgram() method to retrieve the HTTP/3 DATAGRAM.

Note that recv_dgram() will need to be called repeatedly until the Done value is returned, as the event will not be re-armed until all buffered DATAGRAMs with the same flow ID are read.

PriorityUpdate

PRIORITY_UPDATE was received.

This indicates that the application can use the take_last_priority_update() method to take the last received PRIORITY_UPDATE for a specified stream.

This event is triggered once per stream until the last PRIORITY_UPDATE is taken. It is recommended that applications defer taking the PRIORITY_UPDATE until after poll() returns Done.

GoAway

GOAWAY was received.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.