1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/// Range & type of chunk store query.
#[derive(Debug, Clone, PartialEq, Eq, Default)]
pub enum QueryRange {
    /// Use a time range on the currently active timeline.
    TimeRange(re_types::datatypes::TimeRange),

    /// Use latest-at semantics.
    #[default]
    LatestAt,
}

impl QueryRange {
    #[inline]
    pub fn is_latest_at(&self) -> bool {
        matches!(self, Self::LatestAt)
    }

    #[inline]
    pub fn is_time_range(&self) -> bool {
        matches!(self, Self::TimeRange(_))
    }
}