pub trait FragmentedSource: Send + Sync {
type Key: Clone + Send + Sync + 'static;
// Required methods
fn fragments(&self) -> LadduDataResult<Vec<DataFragment<Self::Key>>>;
fn read_fragment_range(
&self,
key: &Self::Key,
local_start: usize,
local_len: usize,
chunk_size: Option<usize>,
) -> LadduDataResult<EventBatchIter>;
}Expand description
Event source composed of independently addressable fragments.
Required Associated Types§
Required Methods§
Sourcefn fragments(&self) -> LadduDataResult<Vec<DataFragment<Self::Key>>>
fn fragments(&self) -> LadduDataResult<Vec<DataFragment<Self::Key>>>
Lists all fragments in global row order.
§Errors
Returns LadduDataError when fragment metadata cannot be read.
Sourcefn read_fragment_range(
&self,
key: &Self::Key,
local_start: usize,
local_len: usize,
chunk_size: Option<usize>,
) -> LadduDataResult<EventBatchIter>
fn read_fragment_range( &self, key: &Self::Key, local_start: usize, local_len: usize, chunk_size: Option<usize>, ) -> LadduDataResult<EventBatchIter>
Reads a contiguous range within one fragment.
§Errors
Returns LadduDataError when the key, range, or chunk size is invalid
or fragment data cannot be read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".