-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(os_str_bytes)]
This is a tracking issue for cross-platform access to the underling bytes (&[u8]
) for &OsStr
by defining it as an unspecified superset of UTF-8.
Assumptions:
- Owned variants of this API are not a blocker for stablization
- Panicking and erroring variants of
from_os_str_bytes_unchecked
are not a blocker for stablization
Public API
impl OsStr {
pub unsafe fn from_os_str_bytes_unchecked(bytes: &[u8]) -> &Self;
pub fn as_os_str_bytes(&self) -> &[u8];
}
impl OsString {
pub unsafe fn from_os_str_bytes_unchecked(bytes: Vec<u8>) -> Self;
pub fn into_os_str_bytes(self) -> Vec<u8>;
}
Steps / History
- Implementation: Allow limited access to
OsStr
bytes #109698, Allow limited access toOsString
bytes #113442 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- What should we refer to this as?
- Currently
os_str_bytes
encoded_bytes
was another name that was brought up
- Currently
Footnotes
zjp-CN, luaneko, tux3 and sprocklem
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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.