pub struct MbrotliDecoder { /* private fields */ }Available on
async_compression_unstable and crate feature brotli-mbrotli only.Implementations§
Source§impl MbrotliDecoder
impl MbrotliDecoder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a decoder that only accepts standard (RFC 7932) brotli streams, whose window is at most 16 MiB.
Sourcepub fn new_with_large_window() -> Self
pub fn new_with_large_window() -> Self
Creates a decoder that also accepts the non-standard large-window brotli format (RFC 9841), with windows of up to 1 GiB.
A large-window stream chooses its own window, so only use this for trusted input. Large
windows are not valid in the HTTP br content coding.
Trait Implementations§
Source§impl Debug for MbrotliDecoder
impl Debug for MbrotliDecoder
Source§impl DecodeV2 for MbrotliDecoder
impl DecodeV2 for MbrotliDecoder
Source§fn reinit(&mut self) -> Result<()>
fn reinit(&mut self) -> Result<()>
Reinitializes this decoder ready to decode a new member/frame of data.
Source§fn decode(
&mut self,
input: &mut PartialBuffer<&[u8]>,
output: &mut WriteBuffer<'_>,
) -> Result<bool>
fn decode( &mut self, input: &mut PartialBuffer<&[u8]>, output: &mut WriteBuffer<'_>, ) -> Result<bool>
Returns whether the end of the stream has been read
Auto Trait Implementations§
impl Forget for MbrotliDecoder
impl Freeze for MbrotliDecoder
impl Move for MbrotliDecoder
impl RefUnwindSafe for MbrotliDecoder
impl Send for MbrotliDecoder
impl Sync for MbrotliDecoder
impl Unpin for MbrotliDecoder
impl UnsafeUnpin for MbrotliDecoder
impl UnwindSafe for MbrotliDecoder
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
Source§impl<T> Decode for T
impl<T> Decode for T
Source§fn reinit(&mut self) -> Result<(), Error>
fn reinit(&mut self) -> Result<(), Error>
Reinitializes this decoder ready to decode a new member/frame of data.
Source§fn decode(
&mut self,
input: &mut PartialBuffer<impl AsRef<[u8]>>,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>,
) -> Result<bool, Error>
fn decode( &mut self, input: &mut PartialBuffer<impl AsRef<[u8]>>, output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>, ) -> Result<bool, Error>
Returns whether the end of the stream has been read