pub enum Frame {
Data {
stream_id: u32,
end_stream: bool,
data: Bytes,
},
Headers {
stream_id: u32,
end_stream: bool,
end_headers: bool,
priority: Option<Priority>,
block: Bytes,
},
Priority {
stream_id: u32,
priority: Priority,
},
Reset {
stream_id: u32,
error_code: u32,
},
Settings {
ack: bool,
settings: Vec<Setting>,
},
PushPromise {
stream_id: u32,
end_headers: bool,
promised_stream_id: u32,
block: Bytes,
},
Ping {
ack: bool,
payload: [u8; 8],
},
GoAway {
last_stream_id: u32,
error_code: u32,
debug: Bytes,
},
WindowUpdate {
stream_id: u32,
increment: u32,
},
Continuation {
stream_id: u32,
end_headers: bool,
block: Bytes,
},
Unknown {
typ: u8,
flags: u8,
stream_id: u32,
payload: Bytes,
},
}Available on crate feature
h2 only.Expand description
A parsed frame. Payloads are zero-copy views over the decoder’s
buffer (kept alive by Bytes refcounting until the frame is
dropped); the connection layer reassembles field blocks from the
block fragments and applies stream semantics. Padding, when
present, is validated and stripped.
Variants§
Data
Headers
Priority
Reset
Settings
PushPromise
Ping
GoAway
WindowUpdate
Continuation
Unknown
A frame type this implementation does not understand; ignored by the connection (RFC 9113 Section 4.1).
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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