pub struct ResponseHeaderDecoder { /* private fields */ }
Expand description
Response header decoder.
Implementations§
Source§impl ResponseHeaderDecoder
impl ResponseHeaderDecoder
Sourcepub fn new(options: ResponseHeaderDecoderOptions) -> Self
pub fn new(options: ResponseHeaderDecoderOptions) -> Self
Create a new decoder.
Sourcepub fn decode(
&mut self,
data: &mut BytesMut,
) -> Result<Option<ResponseHeader>, CodecError>
pub fn decode( &mut self, data: &mut BytesMut, ) -> Result<Option<ResponseHeader>, CodecError>
Decode a given response header chunk.
Sourcepub fn decode_eof(
&mut self,
data: &mut BytesMut,
) -> Result<Option<ResponseHeader>, CodecError>
pub fn decode_eof( &mut self, data: &mut BytesMut, ) -> Result<Option<ResponseHeader>, CodecError>
Decode a given response header chunk at the end of the stream.
Trait Implementations§
Source§impl Decoder for ResponseHeaderDecoder
impl Decoder for ResponseHeaderDecoder
Source§type Item = ResponseHeader
type Item = ResponseHeader
The type of decoded frames.
Source§type Error = CodecError
type Error = CodecError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(
&mut self,
buf: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, buf: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl !Freeze for ResponseHeaderDecoder
impl RefUnwindSafe for ResponseHeaderDecoder
impl Send for ResponseHeaderDecoder
impl Sync for ResponseHeaderDecoder
impl Unpin for ResponseHeaderDecoder
impl UnwindSafe for ResponseHeaderDecoder
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