WCharString

Trait WCharString 

Source
pub trait WCharString {
    // Required methods
    fn zero_terminated(&self) -> Option<&Self>;
    fn as_u16_str(&self) -> Result<&Utf16Str, Error>;
}
Expand description

Syntactic sugar for dealing with UTF16 referenced slices.

Required Methods§

Source

fn zero_terminated(&self) -> Option<&Self>

Get the zero-terminated representation of this string, or None if it is not zero-terminated.

Source

fn as_u16_str(&self) -> Result<&Utf16Str, Error>

Get the string slice as a Utf16Str.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl WCharString for [WChar]

Implementors§