-
-
Notifications
You must be signed in to change notification settings - Fork 17k
Tracking Issue for core_io_borrowed_buf #117693
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
View all comments
Feature gate:
#![feature(core_io_borrowed_buf)]This is a tracking issue for an MVP of
core::io, which contains an OS-independent subset ofstd::io.Public API
The initial API of this module consists of
BorrowedBufandBorrowedCursor, which were previously only available instd.Steps / History
BorrowedBufandBorrowedCursorfromstd:iotocore::io#117694See also: #78485
Unresolved Questions
BorrowedBufandBorrowedCursorgeneric over the data #149749) double-check any bounds we might want before stabilizationDebug(which was easy sinceu8: Debug), but for generic do we want always-Debugor only forT: Debug?Naming:
BorrowedCursor::writtenneeds renaming tobuf_written(implementation work only) Tracking Issue forcore_io_borrowed_buf#117693 (comment)core::ioorcore::mem? Tracking Issue forcore_io_borrowed_buf#117693 (comment), #t-libs > `io::BorrowedBuf` or `mem::BorrowedBuf`BorrowedCursorbe renamed toBorrowedWriter? It's more similar toBufWriterthanCursorTracking Issue forcore_io_borrowed_buf#117693 (comment), #t-libs > Why is it called `io::BorrowedCursor`?read_bufTracking Issue forcore_io_borrowed_buf#117693 (comment) (Concern 5)Documentation:
core_io_borrowed_buf#117693 (comment) / Tracking Issue forcore_io_borrowed_buf#117693 (comment)core_io_borrowed_buf#117693 (comment), what exists is confusing and methods are not in useful order Tracking Issue forcore_io_borrowed_buf#117693 (comment) (concern 1)API confusion:
BorrowedCursor::capacityindicates remaining capacity rather than total capacity, unlikeVecTracking Issue forcore_io_borrowed_buf#117693 (comment)borrowed_buf_initis confusing:advanceandadvance_checkedare split, affectsas_mutTracking Issue forcore_io_borrowed_buf#117693 (comment), Tracking Issue forcore_io_borrowed_buf#117693 (comment) (concern 3)into_filledandinto_filled_mut? Tracking Issue forcore_io_borrowed_buf#117693 (comment)core_io_borrowed_buf#117693 (comment)is_empty? (Not blocking) Tracking Issue forcore_io_borrowed_buf#117693 (comment)selfTracking Issue forcore_io_borrowed_buf#117693 (comment)writtenconfusion,positionas an alternative Tracking Issue forcore_io_borrowed_buf#117693 (comment)Variance:
BorrowedCursor<'data>, which would be invariant, but make it covariant with a lot ofunsafe. This is fragile compared toBorrowedCursor<'buf, 'data>Tracking Issue forcore_io_borrowed_buf#117693 (comment), Tracking Issue forcore_io_borrowed_buf#117693 (comment), #t-libs > Why is it called `io::BorrowedCursor`? @ 💬Trait and bounds:
Debug? We don't haveT: Debugin the current impl Tracking Issue forcore_io_borrowed_buf#117693 (comment)T: CopyTracking Issue forcore_io_borrowed_buf#117693 (comment)Other:
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩