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
Unresolved Questions
Feature gate:
#![feature(cstr_bytes)]This is a tracking issue for the
CStr::bytesAPI.Public API
Steps / History
CStr::bytesiterator libs-team#135impl Send + Syncand overridecountfor theCStr::bytesiterator #127444Unresolved Questions
std::ffi::candstd::ffi::ossubmodules libs-team#134. (Resolution: Store incore::ffi::c_str.)AsRef<CStr>andas_c_strmethod be added toCStrBytesto reflect theslice::IterAPI?Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/api-change-proposals.html ↩
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩