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§

source

type Open: ReadSourceOpen

The type used to handle open source files

source

type Iter: Iterator<Item = RusticResult<ReadSourceEntry<Self::Open>>>

The iterator we use to iterate over the source entries

Required Methods§

source

fn size(&self) -> RusticResult<Option<u64>>

Returns the size of the source.

source

fn entries(&self) -> Self::Iter

Returns an iterator over the entries of the source.

Implementors§