Trait rustic_core::ReadSource
source · 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
Required Methods§
sourcefn size(&self) -> RusticResult<Option<u64>>
fn size(&self) -> RusticResult<Option<u64>>
Returns the size of the source.