pub enum H3Event {
    IncomingSettings {
        settings: Vec<(u64, u64)>,
    },
    IncomingHeaders(IncomingH3Headers),
    NewFlow {
        flow_id: u64,
        send: OutboundFrameSender,
        recv: InboundFrameStream,
    },
    ResetStream {
        stream_id: u64,
    },
    ConnectionError(Error),
    ConnectionShutdown(Option<H3ConnectionError>),
    BodyBytesReceived {
        stream_id: u64,
        num_bytes: u64,
        fin: bool,
    },
    StreamClosed {
        stream_id: u64,
    },
}Expand description
H3Events are produced by an H3Driver to describe HTTP/3 state updates.
Both ServerH3Driver and ClientH3Driver may extend this enum with
endpoint-specific variants. The events must be consumed by users of the
drivers, like a higher-level Server or Client controller.
Variants§
IncomingSettings
A SETTINGS frame was received.
IncomingHeaders(IncomingH3Headers)
A HEADERS frame was received on the given stream. This is either a
request or a response depending on the perspective of the H3Event
receiver.
NewFlow
A DATAGRAM flow was created and associated with the given flow_id.
This event is fired before a HEADERS event for CONNECT[-UDP] requests.
Fields
send: OutboundFrameSenderAn OutboundFrameSender for transmitting datagrams to the peer.
recv: InboundFrameStreamAn InboundFrameStream for receiving datagrams from the peer.
ResetStream
A RST_STREAM frame was seen on the given stream_id. The user of the
driver should clean up any state allocated for this stream.
ConnectionError(Error)
The connection has irrecoverably errored and is shutting down.
ConnectionShutdown(Option<H3ConnectionError>)
The connection has been shutdown, optionally due to an
H3ConnectionError.
BodyBytesReceived
Body data has been received over a stream.
Fields
StreamClosed
The stream has been closed. This is used to signal stream closures that
don’t result from RST_STREAM frames, unlike the
H3Event::ResetStream variant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for H3Event
impl !RefUnwindSafe for H3Event
impl Send for H3Event
impl Sync for H3Event
impl Unpin for H3Event
impl !UnwindSafe for H3Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more