pub struct LargeBufferConfig {
pub initial_capacity: usize,
pub max_capacity: usize,
pub spill_threshold: usize,
pub temp_dir: Option<PathBuf>,
}Expand description
Configuration for buffer behavior.
Fields§
§initial_capacity: usizeInitial capacity in bytes.
max_capacity: usizeMaximum capacity in bytes.
spill_threshold: usizeThreshold at which to spill to disk (0 = never).
temp_dir: Option<PathBuf>Directory for temporary files.
Implementations§
Source§impl LargeBufferConfig
impl LargeBufferConfig
Sourcepub fn new(max_capacity: usize) -> Self
pub fn new(max_capacity: usize) -> Self
Create a new configuration with the given max capacity.
Sourcepub const fn initial_capacity(self, capacity: usize) -> Self
pub const fn initial_capacity(self, capacity: usize) -> Self
Set initial capacity.
Sourcepub const fn spill_threshold(self, threshold: usize) -> Self
pub const fn spill_threshold(self, threshold: usize) -> Self
Set spill threshold.
Trait Implementations§
Source§impl Clone for LargeBufferConfig
impl Clone for LargeBufferConfig
Source§fn clone(&self) -> LargeBufferConfig
fn clone(&self) -> LargeBufferConfig
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 LargeBufferConfig
impl Debug for LargeBufferConfig
Auto Trait Implementations§
impl Freeze for LargeBufferConfig
impl RefUnwindSafe for LargeBufferConfig
impl Send for LargeBufferConfig
impl Sync for LargeBufferConfig
impl Unpin for LargeBufferConfig
impl UnwindSafe for LargeBufferConfig
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