Struct faithe::types::UnicodeString
source · [−]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
sourceimpl UnicodeString
impl UnicodeString
sourcepub unsafe fn decode_utf16_unchecked(&self) -> String
pub unsafe fn decode_utf16_unchecked(&self) -> String
Converts wide string into alloc::string::String
by cloning data.
Safety
This function doesn’t check if self.buffer
== 0.
sourcepub unsafe fn decode_utf16(&self) -> Option<String>
pub unsafe fn decode_utf16(&self) -> Option<String>
Converts wide string into alloc::string::String
by cloning data.
Safety
This function only checks if self.buffer
!= 0 and if self.len
!= 0.
Trait Implementations
sourceimpl PartialEq<UnicodeString> for UnicodeString
impl PartialEq<UnicodeString> for UnicodeString
Auto Trait Implementations
impl RefUnwindSafe for UnicodeString
impl !Send for UnicodeString
impl !Sync for UnicodeString
impl Unpin for UnicodeString
impl UnwindSafe for UnicodeString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more