pub enum Event<'a> {
Headers {
stream: u32,
headers: &'a Headers,
end_stream: bool,
},
Data {
stream: u32,
data: &'a [u8],
end_stream: bool,
},
Trailers {
stream: u32,
trailers: &'a Headers,
},
Reset {
stream: u32,
code: ErrorCode,
remote: bool,
},
Settings,
Pong {
data: [u8; 8],
},
GoAway {
last_stream: u32,
code: ErrorCode,
debug: &'a [u8],
},
Closed {
code: ErrorCode,
},
}Expand description
Something the peer did, reported by Connection::recv and Connection::handle_timeout.
Variants§
Headers
Request headers (server), or response headers including 1xx (client).
Data
Request or response body bytes. Call Connection::release once they are consumed.
Trailers
Trailers; they always end the stream.
Reset
The stream ended abnormally: reset by the peer (remote), refused by its GOAWAY, or
reset by us after a stream error. Stop its work, then call
Connection::stream_finished.
Settings
The peer’s SETTINGS were applied (and acknowledged).
Pong
The answer to Connection::ping.
GoAway
The peer is shutting down: no stream above last_stream will be processed.
Closed
We closed the connection with a GOAWAY carrying code (a connection error or an
exceeded budget). Flush the output, then close the transport.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for Event<'a>
impl<'a> Freeze for Event<'a>
impl<'a> Move for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnsafeUnpin for Event<'a>
impl<'a> UnwindSafe for Event<'a>
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
Mutably borrows from an owned value. Read more