pub struct Config {
pub initial_capacity: usize,
pub min_capacity: usize,
pub max_capacity: usize,
pub growth_factor: f64,
pub shrink_threshold: f64,
pub push_timeout: Option<Duration>,
pub pop_timeout: Option<Duration>,
}
Fields§
§initial_capacity: usize
§min_capacity: usize
§max_capacity: usize
§growth_factor: f64
§shrink_threshold: f64
§push_timeout: Option<Duration>
§pop_timeout: Option<Duration>
Implementations§
Source§impl Config
impl Config
pub fn validate(&self) -> Result<(), BufferError>
pub fn with_initial_capacity(self, capacity: usize) -> Self
pub fn with_min_capacity(self, capacity: usize) -> Self
pub fn with_max_capacity(self, capacity: usize) -> Self
pub fn with_growth_factor(self, factor: f64) -> Self
pub fn with_shrink_threshold(self, threshold: f64) -> Self
pub fn with_push_timeout(self, timeout: Duration) -> Self
pub fn with_pop_timeout(self, timeout: Duration) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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