Skip to main content

bucket_bounds

Function bucket_bounds 

Source
pub fn bucket_bounds(
    timestamp: NaiveDateTime,
    spec: BucketSpec,
) -> Option<(NaiveDateTime, NaiveDateTime)>
Expand description

Half-open [open, close) bucket containing timestamp.

Returns None only when the bucket boundary would overflow the representable timestamp range.