rust
rust copied to clipboard
Tracking Issue for `CStr::bytes`
Feature gate: #![feature(cstr_bytes)]
This is a tracking issue for the CStr::bytes
API.
Public API
impl CStr {
pub fn bytes(&self) -> CStrBytes<'_>;
}
// core::ffi::c_str::Bytes
pub struct Bytes<'a> {
// ...
}
impl Iterator for Bytes<'_> {
type Item = u8;
// ...
}
Steps / History
- [x] API change proposal (ACP)^1: rust-lang/libs-team#135
- [ ] Implementation: #104353
- [ ] Final comment period (FCP)^2
- [ ] Stabilization PR
Unresolved Questions
- [x] Where should this type be located? This is discussed in rust-lang/libs-team#134. (Resolution: Store in
core::ffi::c_str
.) - [ ] Should an
AsRef<CStr>
andas_c_str
method be added toCStrBytes
to reflect theslice::Iter
API?