Repository navigation
refactor!: shrink the buffer API and match Asio's iterator names - #479
Conversation
Remove buffer_slice and slice_type, which neither capy nor corosio used; buffer_copy's at_most argument covers the one caller in http. Remove buffer_param and const_buffer_param, whose only user is http, which now keeps its own copy. Move consuming_buffers into detail. The composed operations still use it, and Asio keeps its equivalent private too. Rename the buffer sequence functions. begin and end become buffer_sequence_begin and buffer_sequence_end, matching Asio. front becomes buffers_front, buffer_length becomes buffers_count, and buffer_empty becomes buffers_empty. Add buffers_iterator with buffers_begin and buffers_end, a random access iterator over the bytes of a buffer sequence, as Asio provides. It skips empty buffers, requires a single buffer or a common range, and rejects temporary sequences. Update the docs and the Asio comparison, and add unit tests for buffers_front and buffers_iterator.
|
An automated preview of the documentation is available at https://479.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-10-30 18:53:14 UTC |
|
GCOVR code coverage report https://479.capy.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-10-30 19:04:28 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #479 +/- ##
===========================================
+ Coverage 98.48% 98.51% +0.02%
===========================================
Files 137 137
Lines 7348 7484 +136
===========================================
+ Hits 7237 7373 +136
Misses 111 111
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Shrinks the public buffer API and aligns the iterator names with Asio.
Removed
buffer_sliceandslice_type. Neither capy nor corosio used them; the one caller in http now usesbuffer_copy'sat_mostargument.buffer_paramandconst_buffer_param. Their only user was http, which now keeps its own copy.Made private
consuming_buffersmoves todetail/consuming_buffers.hpp. The composed operations still use it, and Asio keeps its equivalent indetailtoo.Renamed
begin/endbuffer_sequence_begin/buffer_sequence_end(as in Asio)front(front.hpp)buffers_front(buffers_front.hpp)buffer_lengthbuffers_countbuffer_emptybuffers_emptyAdded
buffers_iteratorwithbuffers_begin/buffers_end: a random access iterator over the bytes of a buffer sequence, as Asio provides. It skips empty buffers, requires a single buffer or a common range, and rejects temporary sequences.Docs, the Asio comparison, and tests are updated, with new unit tests for
buffers_frontandbuffers_iterator.Merge order: merge this first, then cppalliance/corosio#408 and cppalliance/http#296, which build against these names.