pub trait PostBundleManager: Send + Sync {
// Required method
fn get_post_bundle<'life0, 'life1, 'async_trait>(
&'life0 self,
bucket_location: &'life1 BucketLocation,
time_millis: TimeMillis,
) -> Pin<Box<dyn Future<Output = Result<EncodedPostBundleV1>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The abstract lookup from “give me the posts at this (location, time) bucket” to an
EncodedPostBundleV1.
Timeline code above this trait does not care whether the bundle came from the local
cache, from a single network peer, or was stitched together from several peers after a
healing round — it just calls get_post_bundle. The production implementation is
crate::client::post_bundle::live_post_bundle_manager::LivePostBundleManager, which
checks local [ClientStorage] first, falls back to the best peer from
[crate::client::peer_tracker::PeerTracker], and transparently heals missing posts.
Tests swap in stub implementations that return canned bundles so the timeline logic can
be exercised without any network.