Skip to main content

Module recursive_bucket_visitor

Module recursive_bucket_visitor 

Source
Expand description

§Depth-first walk over the hierarchical bucket ladder

The pure, storage-free algorithm behind every timeline. Given a time range and the bucket-duration sequence from crate::tools::buckets::BUCKET_DURATIONS, RecursiveBucketVisitor visits buckets in depth-first order — coarse granularity first, drilling into finer granularity where the open callback asks for it.

Two callbacks steer the walk:

  • Open — called before descending into a bucket. Returns ContinueWithChildren, ContinueWithoutChildren (skip this subtree — empty buckets), or Stop (abort the whole walk — enough posts collected).
  • Close — called when leaving a bucket, so timelines can decide whether to back off to coarser granularity or continue stepping within the current level.

The visitor has zero knowledge of posts, caches, networks, or deduplication — it is a plain tree walker; everything else is implemented on top of it by crate::client::timeline::single_timeline::SingleTimeline.

Structs§

RecursiveBucketVisitor

Enums§

RecursiveBucketVisitorCloseCallbackResult
RecursiveBucketVisitorOpenCallbackResult