pub struct Decoder {
max_size_update: Option<usize>,
last_max_update: usize,
table: Table,
buffer: BytesMut,
}
Expand description
Decodes headers using HPACK
Fields§
§max_size_update: Option<usize>
§last_max_update: usize
§table: Table
§buffer: BytesMut
Implementations§
source§impl Decoder
impl Decoder
sourcepub fn new(size: usize) -> Decoder
pub fn new(size: usize) -> Decoder
Creates a new Decoder
with all settings set to default values.
sourcepub fn queue_size_update(&mut self, size: usize)
pub fn queue_size_update(&mut self, size: usize)
Queues a potential size update
sourcepub fn decode<F>(
&mut self,
src: &mut Cursor<&mut BytesMut>,
f: F,
) -> Result<(), DecoderError>
pub fn decode<F>( &mut self, src: &mut Cursor<&mut BytesMut>, f: F, ) -> Result<(), DecoderError>
Decodes the headers found in the given buffer.
fn process_size_update( &mut self, buf: &mut Cursor<&mut BytesMut>, ) -> Result<(), DecoderError>
fn decode_indexed( &self, buf: &mut Cursor<&mut BytesMut>, ) -> Result<Header, DecoderError>
fn decode_literal( &mut self, buf: &mut Cursor<&mut BytesMut>, index: bool, ) -> Result<Header, DecoderError>
fn try_decode_string( &mut self, buf: &mut Cursor<&mut BytesMut>, ) -> Result<StringMarker, DecoderError>
fn decode_string( &mut self, buf: &mut Cursor<&mut BytesMut>, ) -> Result<Bytes, DecoderError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
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