fast_pull/base/reader.rs
1use crate::ProgressEntry;
2use bytes::Bytes;
3use futures::TryStream;
4
5pub trait RandReader: Send + Clone {
6 type Error: Send;
7 fn read(
8 &mut self,
9 range: &ProgressEntry,
10 ) -> impl TryStream<Ok = Bytes, Error = Self::Error> + Send + Unpin;
11}
12
13pub trait SeqReader: Send {
14 type Error: Send;
15 fn read(&mut self) -> impl TryStream<Ok = Bytes, Error = Self::Error> + Send + Unpin;
16}