pub enum Wtf16 {}Expand description
The WTF-16 encoding: arbitrary, ill-formed-surrogate-tolerant UTF-16 stored as
u16 code units.
This is the v1 encoding and the representation Windows wide (*W) APIs consume
directly. It is a pure type-level marker and is never constructed.
Trait Implementations§
Source§impl WtfEncoding for Wtf16
impl WtfEncoding for Wtf16
Source§const NUL: u16 = 0
const NUL: u16 = 0
The NUL code unit (
U+0000) used as the always-present buffer terminator. Read moreSource§fn decode(units: &[u16]) -> Option<String>
fn decode(units: &[u16]) -> Option<String>
Decode content code units to a
String if they are well-formed for this
encoding, or None if they are ill-formed (e.g. an unpaired surrogate),
which a strict String cannot represent.Source§fn decode_lossy(units: &[u16]) -> String
fn decode_lossy(units: &[u16]) -> String
Decode content code units to a
String, replacing any ill-formed sequence
with the Unicode replacement character (U+FFFD).Auto Trait Implementations§
impl Freeze for Wtf16
impl RefUnwindSafe for Wtf16
impl Send for Wtf16
impl Sync for Wtf16
impl Unpin for Wtf16
impl UnsafeUnpin for Wtf16
impl UnwindSafe for Wtf16
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more