pub trait SegmentSource:
'static
+ Send
+ Sync {
// Required method
fn request(&self, id: SegmentId) -> SegmentFuture;
}Expand description
Provides segment data to a crate::LayoutReader.
Implementations may issue asynchronous file reads, object-store requests, cache lookups, or in-memory buffer slices. Returned futures must be independent and safe to poll concurrently.
Required Methods§
Sourcefn request(&self, id: SegmentId) -> SegmentFuture
fn request(&self, id: SegmentId) -> SegmentFuture
Request a segment, returning a future that will eventually resolve to the segment data.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".