pub struct TimeWindow {
pub from_ms: i64,
pub to_ms: i64,
}Expand description
A half-open [from, to) window in epoch milliseconds.
Every read path takes one of these; it is what lets the scanner open only the partitions that overlap the requested period.
Fields§
§from_ms: i64Inclusive lower bound, epoch ms.
to_ms: i64Exclusive upper bound, epoch ms.
Implementations§
Source§impl TimeWindow
impl TimeWindow
pub fn new(from_ms: i64, to_ms: i64) -> Self
pub fn contains(&self, ts_ms: i64) -> bool
pub fn from(&self) -> Option<DateTime<Utc>>
pub fn to(&self) -> Option<DateTime<Utc>>
Sourcepub fn parse_since(
spec: &str,
now: DateTime<Utc>,
) -> Result<Self, SinceParseError>
pub fn parse_since( spec: &str, now: DateTime<Utc>, ) -> Result<Self, SinceParseError>
Parse a --since value relative to now, ending at now.
Trait Implementations§
Source§impl Clone for TimeWindow
impl Clone for TimeWindow
Source§fn clone(&self) -> TimeWindow
fn clone(&self) -> TimeWindow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TimeWindow
Source§impl Debug for TimeWindow
impl Debug for TimeWindow
impl Eq for TimeWindow
Source§impl PartialEq for TimeWindow
impl PartialEq for TimeWindow
impl StructuralPartialEq for TimeWindow
Auto Trait Implementations§
impl Freeze for TimeWindow
impl RefUnwindSafe for TimeWindow
impl Send for TimeWindow
impl Sync for TimeWindow
impl Unpin for TimeWindow
impl UnsafeUnpin for TimeWindow
impl UnwindSafe for TimeWindow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.