Closed
Description
Feature gate: #![feature(decode_utf8)]
This is a tracking issue for decoding characters from byte (u8
) iterators.
Public API
// core::char
struct DecodeUtf8<I: Iterator<Item = u8>>;
impl Iterator for DecodeUtf8<_> { .. }
struct DecodeUtf8Error;
impl DecodeUtf8Error {
fn invalid_byte(&self) -> u8;
}
// Also a method on `char`
fn decode_utf8<I: IntoIterator<Item = u8>>(i: I) -> DecodeUtf8<I::IntoIter>;
Steps / History
- Implementation: Add a way to decode utf-8 while handling errors #90980
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Should the error just consist of a single byte?