Skip to main content

SourceReader

Trait SourceReader 

Source
pub trait SourceReader: Send {
    // Required methods
    fn next_row(&mut self) -> Result<Option<SourceRow>>;
    fn headers(&self) -> &[String];
    fn reset(&mut self) -> Result<()>;

    // Provided method
    fn supports_reset(&self) -> bool { ... }
}

Required Methods§

Source

fn next_row(&mut self) -> Result<Option<SourceRow>>

Source

fn headers(&self) -> &[String]

Source

fn reset(&mut self) -> Result<()>

Attempt to reset the reader to the beginning. Returns Ok(()) even if unsupported — check supports_reset() first.

Provided Methods§

Source

fn supports_reset(&self) -> bool

Whether reset() is actually supported by this reader. Readers wrapping non-seekable streams (stdin, network) return false.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§