Skip to main content

Module wtf8

Module wtf8 

Source
πŸ”¬This is a nightly-only experimental API. (wtf8_internals)
Expand description

Implementation of the WTF-8 encoding.

This library uses Rust’s type system to maintain well-formedness, like the String and &str types do for UTF-8.

Since WTF-8 must not be used for interchange, this library deliberately does not provide access to the underlying bytes of WTF-8 strings, nor can it decode WTF-8 from arbitrary bytes. WTF-8 strings can be obtained from UTF-8, UTF-16, or code points.

Re-exportsΒ§

use crate::char::EscapeDebugExtArgs; πŸ”’
use crate::char::encode_utf16_raw; πŸ”’ Experimental
use crate::clone::CloneToUninit; πŸ”’ Experimental
use crate::fmt; πŸ”’
use crate::fmt::Write; πŸ”’
use crate::hash::Hash; πŸ”’
use crate::hash::Hash; πŸ”’
use crate::hash::Hasher; πŸ”’
use crate::iter::FusedIterator; πŸ”’
use crate::num::niche_types::CodePointInner; πŸ”’ Experimental
use crate::str::next_code_point; πŸ”’ Experimental
use crate::ops; πŸ”’
use crate::slice; πŸ”’
use crate::str; πŸ”’

StructsΒ§

CodePoint πŸ‘» Experimental
A Unicode code point: from U+0000 to U+10FFFF.
EncodeWide πŸ‘» Experimental
Generates a wide character sequence for potentially ill-formed UTF-16.
Wtf8 πŸ‘» Experimental
A borrowed slice of well-formed WTF-8 data.
Wtf8CodePoints πŸ‘» Experimental
Iterator for the code points of a WTF-8 string.

EnumsΒ§

Utf8BoundaryErrorExperimental

FunctionsΒ§

decode_surrogate πŸ”’ Experimental
slice_error_fail πŸ”’ Experimental
slice_unchecked πŸ”’ ⚠Experimental
Copied from core::str::raw::slice_unchecked