pub struct Partition {
pub year: i32,
pub month: u32,
}Expand description
One month of data, in UTC. Partition membership is decided by the event’s UTC month, so a boundary is unambiguous regardless of local timezone.
Fields§
§year: i32§month: u32Implementations§
Source§impl Partition
impl Partition
pub fn new(year: i32, month: u32) -> Self
Sourcepub fn for_timestamp(ts_ms: i64) -> Option<Self>
pub fn for_timestamp(ts_ms: i64) -> Option<Self>
The partition an epoch-millisecond timestamp routes to.
Sourcepub fn parse_stem(stem: &str) -> Option<Self>
pub fn parse_stem(stem: &str) -> Option<Self>
Parse YYYY-MM from a partition file stem.
pub fn file_name(&self) -> String
pub fn next(&self) -> Self
Trait Implementations§
impl Copy for Partition
impl Eq for Partition
Source§impl Ord for Partition
impl Ord for Partition
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Partition
impl PartialOrd for Partition
impl StructuralPartialEq for Partition
Auto Trait Implementations§
impl Freeze for Partition
impl RefUnwindSafe for Partition
impl Send for Partition
impl Sync for Partition
impl Unpin for Partition
impl UnsafeUnpin for Partition
impl UnwindSafe for Partition
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.