This is another little cleanup which I hope is correct, please forgive me
if not. But basically, in ClientRequest code, don't we know that role is
Client?
Replace &String with &str in fn params, this is almost always preferable.
Use into() instead of String::from(), less words.
rustfmt also did some whitespace changes.
Cut down Sendable/Recvable traits to only include methods the client will
use.
Stub somewhere to queue flow control frames.
rustfmt caused some whitespace changes in qpack code.
Connection::new_client and new_server can fail, so make them return
Res<>.
Add cur_time to process() and use where clause to help readability
Fix tests and client/server as needed
Also, Frame::marshal() never fails so have it not return a Result.
We need to have callers preserve the connection after an error is
encountered so that CONNECTION_CLOSE frames can be sent. An application
might choose to abandon a connection as soon as it hits closing, but the
basic contract here is that processing continues until the state changes
to closed.
encapsulate send buffer and other stuff in a state enum. This ensures
vars can only be accessed when in the right state, and nicely discards
things as they are no longer needed.
Add reset_acked(), which we might need someday (and avoids a warning about
unused enum variant in the meantime)
Renamed conn::reset_stream to stream_reset so that all stream methods
start with "stream_"
Remove allow_partial param to TxBuffer::next_bytes. All users
now call mark_as_sent().
Add generate_stream_frames() as a FrameGenerator
Create new stream if we receive a stream frame for it
add Connection::stream_send() and stream_close_send()
Rename get_readable/writable_streams() to get_read/write_streams. Change
them to get a trait object w/o calling as_recvable() and as_sendable().
Create new methods called get_readable/writeable_streams to get streams
filtered by if they have data available or can accept data.
Change get_cid_len to 8, which was needed for streams to work.
Add test_conn_stream()
Make changes as needed to http3 and other code since some connection and
stream APIs now can fail
Make streams collection a btreemap for now, for deterministic iteration
ordering.
Tidy some use stmts in data.rs
Add next_bytes() and final_size() to trait Sendable.
Make Sendable::send() return Res and close() set final_size.