pub struct Headers { /* private fields */ }
Expand description
Header frame
This could be either a request or a response.
Implementations§
Source§impl Headers
impl Headers
Sourcepub fn new(
stream_id: StreamId,
pseudo: PseudoHeaders,
fields: HeaderMap,
eof: bool,
) -> Self
pub fn new( stream_id: StreamId, pseudo: PseudoHeaders, fields: HeaderMap, eof: bool, ) -> Self
Create a new HEADERS frame
pub fn trailers(stream_id: StreamId, fields: HeaderMap) -> Self
Sourcepub fn load(head: Head, src: &mut BytesMut) -> Result<Self, FrameError>
pub fn load(head: Head, src: &mut BytesMut) -> Result<Self, FrameError>
Loads the header frame but doesn’t actually do HPACK decoding.
HPACK decoding is done in the load_hpack
step.
pub fn load_hpack( &mut self, src: &mut BytesMut, decoder: &mut Decoder, ) -> Result<(), FrameError>
pub fn stream_id(&self) -> StreamId
pub fn is_end_headers(&self) -> bool
pub fn set_end_headers(&mut self)
pub fn is_end_stream(&self) -> bool
pub fn set_end_stream(&mut self)
pub fn into_parts(self) -> (PseudoHeaders, HeaderMap)
pub fn fields(&self) -> &HeaderMap
pub fn pseudo(&self) -> &PseudoHeaders
pub fn into_fields(self) -> HeaderMap
pub fn encode(self, encoder: &mut Encoder, dst: &mut BytesMut, max_size: usize)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Headers
impl !RefUnwindSafe for Headers
impl Send for Headers
impl Sync for Headers
impl Unpin for Headers
impl !UnwindSafe for Headers
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