#[repr(C)]
pub struct UnicodeString { pub len: u16, pub maximum_len: u16, pub buffer: *mut u16, }
Expand description

UTF16 String.

Fields

len: u16

Length of the string, in bytes.

maximum_len: u16

Allocated size, in bytes.

buffer: *mut u16

Pointer to actual UTF-16 data.

Implementations

Converts wide string into alloc::string::String by cloning data.

Safety

This function doesn’t check if self.buffer == 0.

Converts wide string into alloc::string::String by cloning data.

Safety

This function only checks if self.buffer != 0 and if self.len != 0.

Checks if either self.len, self.maximum_len or self.buffer == 0. If this function returns true it doesn’t guarantee that self.buffer points to valid memory.

Trait Implementations

This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.