pub struct FetchBodyLimits { /* private fields */ }Expand description
Independent decoded-byte and HTML-parser limits.
Implementations§
Source§impl FetchBodyLimits
impl FetchBodyLimits
Sourcepub fn new(
max_decoded_bytes: usize,
max_html_bytes: usize,
max_html_elements: usize,
) -> Result<Self, FetchProviderError>
pub fn new( max_decoded_bytes: usize, max_html_bytes: usize, max_html_elements: usize, ) -> Result<Self, FetchProviderError>
Creates response-body limits.
§Errors
Rejects zero values, decoded bounds above 16 MiB, and HTML bounds above the decoded-byte limit.
Sourcepub const fn max_decoded_bytes(self) -> usize
pub const fn max_decoded_bytes(self) -> usize
Returns the decoded-byte limit.
Sourcepub const fn max_html_bytes(self) -> usize
pub const fn max_html_bytes(self) -> usize
Returns the HTML input byte limit.
Sourcepub const fn max_html_elements(self) -> usize
pub const fn max_html_elements(self) -> usize
Returns the HTML element-marker limit.
Trait Implementations§
Source§impl Clone for FetchBodyLimits
impl Clone for FetchBodyLimits
impl Copy for FetchBodyLimits
Source§impl Debug for FetchBodyLimits
impl Debug for FetchBodyLimits
Source§impl Default for FetchBodyLimits
impl Default for FetchBodyLimits
impl Eq for FetchBodyLimits
Source§impl Ord for FetchBodyLimits
impl Ord for FetchBodyLimits
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for FetchBodyLimits
impl PartialEq for FetchBodyLimits
Source§impl PartialOrd for FetchBodyLimits
impl PartialOrd for FetchBodyLimits
impl StructuralPartialEq for FetchBodyLimits
Auto Trait Implementations§
impl Freeze for FetchBodyLimits
impl RefUnwindSafe for FetchBodyLimits
impl Send for FetchBodyLimits
impl Sync for FetchBodyLimits
impl Unpin for FetchBodyLimits
impl UnsafeUnpin for FetchBodyLimits
impl UnwindSafe for FetchBodyLimits
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.