-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tracking Issue for core_io_borrowed_buf
#117693
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
core::io
core_io_borrowed_buf
…m-ou-se Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io` Tracking issue: rust-lang#117693 ACP: rust-lang/libs-team#290
…m-ou-se Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io` Tracking issue: rust-lang#117693 ACP: rust-lang/libs-team#290
…m-ou-se Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io` Tracking issue: rust-lang#117693 ACP: rust-lang/libs-team#290
Rollup merge of rust-lang#117694 - jmillikin:core-io-borrowed-buf, r=m-ou-se Move `BorrowedBuf` and `BorrowedCursor` from `std:io` to `core::io` Tracking issue: rust-lang#117693 ACP: rust-lang/libs-team#290
Unbreaks builds using the read_buf feature. Tracking issue: rust-lang/rust#117693
These types in core could use a |
Is the intent to stabilize this at the same time as #78485 or independently of it? |
I'm surprised that this doesn't have any safe integration with |
This comment was marked as resolved.
This comment was marked as resolved.
If I understand, /// Copies the bytes of `buf` to self starting at `offset`.
/// Returns the number of bytes actually written.
///
/// If `offset` is equal or larger than `self.buf.len()`, returns 0.
/// If `offset` is larger than `self.init`, the region `self.buf[self.init..offset]` is zeroed.
pub fn write(&mut self, offset: usize, buf: &[u8]) -> usize (this method updates The idea is to make the API even easier to use:
What do you think? |
Add BorrowedBuf::into_filled{,_mut} methods to allow returning buffer with original lifetime See rust-lang/libs-team#473 and tracking issue rust-lang#117693.
Rollup merge of rust-lang#132533 - SUPERCILEX:patch-4, r=Mark-Simulacrum Add BorrowedBuf::into_filled{,_mut} methods to allow returning buffer with original lifetime See rust-lang/libs-team#473 and tracking issue rust-lang#117693.
According to the source code, Capacity() returns self.filled, which appears inconsistent with the descriptions of capacity, filled, and initialized. |
.@sunfishcode wrote about an alternative to the While this tracking issue is not the right avenue to discuss the tradeoffs and differences between the two APIs 1, I wanted to make sure that it was mentioned on this tracking issue. It seems like a credible alternative to the Footnotes
|
There are three threads, two of them are old: |
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
BorrowedBuf
andBorrowedCursor
, which were previously only available instd
.Steps / History
BorrowedBuf
andBorrowedCursor
fromstd:io
tocore::io
#117694Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: