pub struct Decoder<'a> { /* private fields */ }
Expand description
An in-memory decoder for streams of data.
Implementations§
§impl<'a> Decoder<'a>
impl<'a> Decoder<'a>
pub fn with_context(context: &'a mut DCtx<'static>) -> Decoder<'a>
pub fn with_context(context: &'a mut DCtx<'static>) -> Decoder<'a>
Creates a new decoder which employs the provided context for deserialization.
pub fn with_prepared_dictionary<'b>(
dictionary: &DecoderDictionary<'b>,
) -> Result<Decoder<'a>, Error>where
'b: 'a,
pub fn with_prepared_dictionary<'b>(
dictionary: &DecoderDictionary<'b>,
) -> Result<Decoder<'a>, Error>where
'b: 'a,
Creates a new decoder, using an existing DecoderDictionary
.
pub fn with_ref_prefix<'b>(ref_prefix: &'b [u8]) -> Result<Decoder<'a>, Error>where
'b: 'a,
pub fn with_ref_prefix<'b>(ref_prefix: &'b [u8]) -> Result<Decoder<'a>, Error>where
'b: 'a,
Creates a new decoder, using a ref prefix
pub fn set_parameter(&mut self, parameter: DParameter) -> Result<(), Error>
pub fn set_parameter(&mut self, parameter: DParameter) -> Result<(), Error>
Sets a decompression parameter for this decoder.
Trait Implementations§
§impl Operation for Decoder<'_>
impl Operation for Decoder<'_>
§fn run<C>(
&mut self,
input: &mut InBuffer<'_>,
output: &mut OutBuffer<'_, C>,
) -> Result<usize, Error>
fn run<C>( &mut self, input: &mut InBuffer<'_>, output: &mut OutBuffer<'_, C>, ) -> Result<usize, Error>
Performs a single step of this operation. Read more
§fn flush<C>(&mut self, output: &mut OutBuffer<'_, C>) -> Result<usize, Error>
fn flush<C>(&mut self, output: &mut OutBuffer<'_, C>) -> Result<usize, Error>
Flushes any internal buffer, if any. Read more
Auto Trait Implementations§
impl<'a> Freeze for Decoder<'a>
impl<'a> RefUnwindSafe for Decoder<'a>
impl<'a> Send for Decoder<'a>
impl<'a> Sync for Decoder<'a>
impl<'a> Unpin for Decoder<'a>
impl<'a> !UnwindSafe for Decoder<'a>
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