Enum rustc_unicode::str::Utf16Item [] [src]

pub enum Utf16Item {
    ScalarValue(char),
    LoneSurrogate(u16),
}
Deprecated since 1.4.0

: char::DecodeUtf16 uses Result<char, u16> instead

The possibilities for values decoded from a u16 stream.

Variants

ScalarValue
Deprecated since 1.4.0

: char::DecodeUtf16 uses Result<char, u16> instead

A valid codepoint.

LoneSurrogate
Deprecated since 1.4.0

: char::DecodeUtf16 uses Result<char, u16> instead

An invalid surrogate without its pair.

Methods

impl Utf16Item

fn to_char_lossy(&self) -> char

Unstable (unicode #27783)

Convert self to a char, taking LoneSurrogates to the replacement character (U+FFFD).

Trait Implementations

Derived Implementations

impl Debug for Utf16Item

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for Utf16Item

fn clone(&self) -> Utf16Item

fn clone_from(&mut self, source: &Self)

impl Eq for Utf16Item

impl PartialEq for Utf16Item

fn eq(&self, __arg_0: &Utf16Item) -> bool

fn ne(&self, __arg_0: &Utf16Item) -> bool

impl Copy for Utf16Item