## Description
Remove Chunk usage in ordered read API
Make read_chunk return just a Bytes. Also rename read_chunks to
read_chunks_many (it already returns Bytes).
Add a bytes_read fn for the rare case where you do need the offset
despite being in ordered read mode.
Not sure if people agree, but there was an inconsistency before between
read_chunk (returns a Chunk, including offset) and read_chunks (fills a
bunch of Bytes, no offset).
Also it doesn't seem useful to have Chunk at all for ordered streams.
You usually don't care about the offset unless you are reading unordered
streams. So I would like to confine Chunk usage to only the (now
separate) unordered read API.
## Breaking Changes
noq::RecvStream::read_chunk returns a Bytes.
noq::RecvStream::read_chunks renamed to read_many_chunks.
## Notes & open questions
Note: while the [other related
PR](https://github.com/n0-computer/noq/pull/536) is just renaming, this
one is I think actually removing some weirdness.
Why does read_chunk give you an offset but read_chunks does not. And
there is no way to get the offset if you need it if you use read_chunks.
---------
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
* Allow configuring the runtime type in the bulk bench
Also switch the default to the multithreaded runtime. I think that is more
representative of actual use.
* fmt
* clippy
---------
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
* Introduce UnorderedRecvStream newtype and remove unordered flag from recv_chunk
The only way to do unordered reads is now via the UnorderedRecvStream.
UnorderedRecvStream duplicates the API of RecvStream related to stream state
* Fix bench
* Update quinn/src/recv_stream.rs
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
* Update quinn/src/recv_stream.rs
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
* Add links to docs.
* Add doc comment to UnorderedRecvStream.
* Remove IllegalOrderedRead in quinn.
We do not remove ReadableError::IllegalOrderedRead in quinn-proto, since
using the current quinn-proto API you can still get it.
So we need to panic in the (single) place where we convert a ReadableError
to a ReadError.
* Move struct definition closer to impl
---------
Co-authored-by: Floris Bruynooghe <flub@n0.computer>
Various `quinn*` crates depend on `tracing`. `tracing` in its default feature
set includes `tracing-attributes` in order to expose `#[instrument]` procedural
macro in `tracing::instrument`.
None of `quinn*` make use of the `#[instrument]` macro. Thus the
`tracing-attributes` dependency is unused.
To remove the dependency from the tree, this commit restricts `tracing`'s
`features` to `std`, effectively removing the `attributes` feature.
This commit updates Quinn's dependency on Rustls from v0.20.3 to
v0.21.0.
This release includes a handful of small breaking changes which are
resolved alongside the upgrade.