1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use std::fmt::Display;
/// Only read up to n data points starting from offset
pub struct Limit {
n: u32,
offset: u32,
}
impl Limit {
pub fn new(n: u32, offset: u32) -> Self {
Self { n, offset }
}
}
impl Display for Limit {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "limit(n: {}, offset: {})", self.n, self.offset)
}
}