Feature gate: #![feature(const_str_from_utf8)]
This is a tracking issue for str::{from_utf8, from_utf8_mut} and str::Utf8Error::{valid_up_to, error_len} as const fn
Public API
// core::str
pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>;
impl str {
pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error>;
}
Public API (stabilized in Rust 1.63)
// core::str
pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error>;
impl Utf8Error {
pub const fn valid_up_to(&self) -> usize;
pub const fn error_len(&self) -> Option<usize>;
}
Steps / History
Unresolved Questions
Feature gate:
#![feature(const_str_from_utf8)]This is a tracking issue for
str::{from_utf8, from_utf8_mut}andstr::Utf8Error::{valid_up_to, error_len}asconst fnPublic API
Public API (stabilized in Rust 1.63)
Steps / History
const#90607&functions)&functions)&mutfunction)&mutfunction)Unresolved Questions