Tracking Issue for os_str_bytes · Issue #111544 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
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) -> Self; pub fn into_os_str_bytes(self) -> Vec; }
Steps / History
- Implementation: Allow limited access to OsStr bytes #109698, Allow limited access to OsString 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