Skip to content

alemigo/bufreaderwriter-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BufReaderWriter

The BufReaderWriterRand<RW> and BufReaderWriterSeq<RW> are convenience structs that facilitate automatic switching between buffered reading and writing from a single underlying IO instance. BufReaderWriterRand is for random access IO (i.e. Read + Write + Seek, such as std::fs::file), while BufReaderWriterSeq is for sequential IO (i.e. Read + Write).

Both structs move the underlying IO instance between a BufReader and BufWriter as needed. However, when switching from reading to writing, BufReaderWriterRand discards any buffered data and seeks the underlying IO instance back to the current BufReader position, while BufReaderWriterSeq saves any buffered data and makes it available for subsequent reads.

Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages