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