Skip to main content

StreamReader

Trait StreamReader 

Source
pub trait StreamReader<R: Read + Seek>: Sized {
    type File: EraFileFormat;
    type Iterator;

    // Required methods
    fn new(reader: R) -> Self;
    fn read(self, network_name: String) -> Result<Self::File, E2sError>;
    fn iter(self) -> Self::Iterator;
}
Expand description

StreamReader for reading era-format files

Required Associated Types§

Source

type File: EraFileFormat

The file type the reader produces

Source

type Iterator

The iterator type for streaming data

Required Methods§

Source

fn new(reader: R) -> Self

Create a new reader

Source

fn read(self, network_name: String) -> Result<Self::File, E2sError>

Read and parse the complete file

Source

fn iter(self) -> Self::Iterator

Get an iterator for streaming processing

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§