pub trait ReadSource: Sync + Send {
type Open: ReadSourceOpen;
type Iter: Iterator<Item = RusticResult<ReadSourceEntry<Self::Open>>>;
// Required methods
fn size(&self) -> RusticResult<Option<u64>>;
fn entries(&self) -> Self::Iter;
}Expand description
Trait for backends that can read from a source.
This trait is implemented by all backends that can read data from a source.
Required Associated Types§
Sourcetype Open: ReadSourceOpen
type Open: ReadSourceOpen
The type used to handle open source files
Sourcetype Iter: Iterator<Item = RusticResult<ReadSourceEntry<Self::Open>>>
type Iter: Iterator<Item = RusticResult<ReadSourceEntry<Self::Open>>>
The iterator we use to iterate over the source entries