1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
pub type UnixTimestamp = i64; pub struct TimeBounds { lower: Option<UnixTimestamp>, upper: Option<UnixTimestamp>, } impl TimeBounds { pub fn new(lower: Option<UnixTimestamp>, upper: Option<UnixTimestamp>) -> TimeBounds { TimeBounds { lower: lower, upper: upper, } } pub fn lower(&self) -> &Option<UnixTimestamp> { &self.lower } pub fn upper(&self) -> &Option<UnixTimestamp> { &self.upper } }