Trait wildland_dfs::IStream

source ·
pub trait IStream: Send + Sync {
    // Required methods
    fn read(&mut self, bytes_count: usize) -> Result<Vec<u8, Global>, StreamErr>;
    fn total_size(&self) -> usize;
}
Expand description

Trait representing input stream which CoreX can read from.

It must be safe to send it between threads.

Required Methods§

source

fn read(&mut self, bytes_count: usize) -> Result<Vec<u8, Global>, StreamErr>

Reads at most number of bytes specified by the bytes_count argument. Empty vector in IStreamResult::Ok(..) means end of stream.

source

fn total_size(&self) -> usize

Provides total size of a Stream in bytes If None returned, operation progress can not be tracked

Trait Implementations§

Implementors§