m4rw3r/chomp

Improving the `buffer` module

m4rw3r opened this issue · 0 comments

Rename module to stream, since it provides tools to deal with streaming data, not just buffering.

Renames

  • stream::Source <- data_source::DataSource
  • stream::IteratorSource <- data_source::IteratorDataSource
  • stream::ReadSource <- data_source::ReadDataSource
  • stream::FixedSizeBuffer
  • stream::GrowingBuffer
  • stream::BufferedInput <- InputBuf
  • stream::Slice <- SliceStream
  • stream::BufferedSource <- Source
  • stream::Error <- StreamError
  • stream::Buffer
  • stream::Stream

Fixes/Updates

  • Source::read should either be unsafe or should always be provided with zeroed memory.
  • Error only use Retry where the stream itself will attempt to refill before trying the parser again, and Incomplete should be used otherwise if the parser requires more data.
  • Look at how Tokio manages buffers and see if we can get that to mesh with Chomp