Tracking Issue for os_str_bytes · Issue #111544 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@epage

Description

@epage

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:

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

Unresolved Questions

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html