pub enum Item {
Data(Bytes),
Frame(Frame),
Skipped {
kind: u64,
},
}Expand description
What FrameReader::next produces.
Variants§
Data(Bytes)
Payload of a DATA frame, in the chunk it arrived in.
One frame may produce several of these, and a chunk never spans two frames. An empty DATA frame produces exactly one, carrying no bytes: a frame that arrived has to be reported even when it says nothing, or the rules about which frame came first cannot be applied to it.
Frame(Frame)
A complete frame of any other type this server acts on.
Skipped
A frame of an unknown type, skipped in full (RFC 9114 §9).
Reported rather than swallowed for the same reason as an empty DATA frame: RFC 9114 §6.2.1 asks what the first frame on the control stream was, and a frame this server did not understand is still a frame. Every other reader ignores it, which is what §9 requires.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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