#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct RingBufSettings {
pub(crate) buffer_size: usize,
pub(crate) buffer_limit: Option<usize>,
}
impl Default for RingBufSettings {
fn default() -> Self {
Self {
buffer_size: 0,
buffer_limit: Some(0),
}
}
}
impl RingBufSettings {
pub fn buffer_size(mut self, size: usize) -> Self {
self.buffer_size = size;
self
}
pub fn buffer_limit(mut self, limit: Option<usize>) -> Self {
self.buffer_limit = limit;
self
}
}