pub struct FetchBodyDecoder { /* private fields */ }Expand description
Bounded decoder and extractor for raw HTTP response bytes.
Implementations§
Source§impl FetchBodyDecoder
impl FetchBodyDecoder
Sourcepub const fn new(limits: FetchBodyLimits) -> Self
pub const fn new(limits: FetchBodyLimits) -> Self
Creates a decoder with explicit independent limits.
Sourcepub const fn limits(self) -> FetchBodyLimits
pub const fn limits(self) -> FetchBodyLimits
Returns the immutable decoding and parser limits.
Sourcepub fn decode(
&self,
headers: &FetchHttpHeaders,
raw: &[u8],
max_chars: usize,
) -> Result<DecodedFetchBody, FetchProviderError>
pub fn decode( &self, headers: &FetchHttpHeaders, raw: &[u8], max_chars: usize, ) -> Result<DecodedFetchBody, FetchProviderError>
Decodes, classifies, parses, and bounds one raw response body.
§Errors
Rejects unsupported content encodings/MIME types, invalid charset data, decompression limit violations, malformed JSON, binary content, and HTML parser inputs above the configured byte/element bounds.
Trait Implementations§
Source§impl Clone for FetchBodyDecoder
impl Clone for FetchBodyDecoder
impl Copy for FetchBodyDecoder
Source§impl Debug for FetchBodyDecoder
impl Debug for FetchBodyDecoder
Source§impl Default for FetchBodyDecoder
impl Default for FetchBodyDecoder
impl Eq for FetchBodyDecoder
Source§impl PartialEq for FetchBodyDecoder
impl PartialEq for FetchBodyDecoder
impl StructuralPartialEq for FetchBodyDecoder
Auto Trait Implementations§
impl Freeze for FetchBodyDecoder
impl RefUnwindSafe for FetchBodyDecoder
impl Send for FetchBodyDecoder
impl Sync for FetchBodyDecoder
impl Unpin for FetchBodyDecoder
impl UnsafeUnpin for FetchBodyDecoder
impl UnwindSafe for FetchBodyDecoder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.