pub enum BufferSize {
Small = 1_024,
Medium = 8_192,
Large = 65_536,
XLarge = 524_288,
Huge = 4_194_304,
}
Expand description
Standard buffer sizes for different parsing scenarios
Variants§
Small = 1_024
Small buffers for short JSON strings (1KB)
Medium = 8_192
Medium buffers for typical API responses (8KB)
Large = 65_536
Large buffers for complex documents (64KB)
XLarge = 524_288
Extra large buffers for bulk data (512KB)
Huge = 4_194_304
Huge buffers for massive documents (4MB)
Implementations§
Source§impl BufferSize
impl BufferSize
Sourcepub fn for_capacity(capacity: usize) -> Self
pub fn for_capacity(capacity: usize) -> Self
Get appropriate buffer size for given capacity
Sourcepub fn all_sizes() -> &'static [BufferSize]
pub fn all_sizes() -> &'static [BufferSize]
Get all available buffer sizes in order
Trait Implementations§
Source§impl Clone for BufferSize
impl Clone for BufferSize
Source§fn clone(&self) -> BufferSize
fn clone(&self) -> BufferSize
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BufferSize
impl Debug for BufferSize
Source§impl Hash for BufferSize
impl Hash for BufferSize
Source§impl Ord for BufferSize
impl Ord for BufferSize
Source§fn cmp(&self, other: &BufferSize) -> Ordering
fn cmp(&self, other: &BufferSize) -> Ordering
1.21.0 · 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
Source§impl PartialEq for BufferSize
impl PartialEq for BufferSize
Source§impl PartialOrd for BufferSize
impl PartialOrd for BufferSize
impl Copy for BufferSize
impl Eq for BufferSize
impl StructuralPartialEq for BufferSize
Auto Trait Implementations§
impl Freeze for BufferSize
impl RefUnwindSafe for BufferSize
impl Send for BufferSize
impl Sync for BufferSize
impl Unpin for BufferSize
impl UnwindSafe for BufferSize
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> 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.