-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(maybe_uninit_as_bytes)
This is a tracking issue for APIs which allow access to individual bytes of a MaybeUninit<T>
. This is always safe even for padding bytes since the bytes are themselves represented as MaybeUninit<u8>
.
Public API
// core::mem
impl<T> MaybeUninit<T> {
pub fn as_bytes(&self) -> &[MaybeUninit<u8>];
pub fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>];
}
impl<T> [MaybeUninit<T>] {
pub const fn as_bytes(&self) -> &[MaybeUninit<u8>];
pub const fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>];
}
Steps / History
- Implementation: Add MaybeUninit::(slice_)as_bytes(_mut) #89747
- Make slice methods inherent: Add inherent versions of MaybeUninit methods for slices #129259
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.
nazar-pc and Slickisnico-abram, kupiakos, reynoldsbd, uael, MolotovCherry and 4 more
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-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.