use std::time::Duration;
#[derive(Debug, Clone, Copy)]
pub struct ReadOptions {
buffer_size: usize,
timeout: Duration,
}
impl ReadOptions {
pub fn new(timeout: Duration, buffer_size: usize) -> Self {
Self {
timeout,
buffer_size,
}
}
pub fn buffer_size(&self) -> usize {
self.buffer_size
}
pub fn timeout(&self) -> Duration {
self.timeout
}
}