pub struct WString { /* private fields */ }Implementations§
Source§impl WString
impl WString
pub fn as_bytes_with_nul(&self) -> &[u16]
pub fn as_bytes(&self) -> &[u16]
pub fn as_u8_bytes_with_nul(&self) -> &[u8] ⓘ
pub fn as_u8_bytes(&self) -> &[u8] ⓘ
pub fn as_c_str(&self) -> &WStr
pub fn as_ptr(&self) -> *const u16
pub fn len(&self) -> usize
pub fn to_string(&self) -> Result<String, FromUtf16Error>
pub fn to_string_lossy(&self) -> String
pub fn new<T: Into<Vec<u16>>>(v: T) -> Self
pub fn new_c<T: Into<Vec<u8>>>(v: T) -> Self
Sourcepub unsafe fn new_nul_unchecked(v: Vec<u16>) -> Self
pub unsafe fn new_nul_unchecked(v: Vec<u16>) -> Self
§Safety
v must be a null-terminated UNICODE string.
Sourcepub unsafe fn from_raw(ptr: *mut wchar_t) -> Self
pub unsafe fn from_raw(ptr: *mut wchar_t) -> Self
§Safety
ptr must be a null-terminated UNICODE string.
pub unsafe fn from_raw_s(ptr: *mut u16, len: usize) -> Self
Trait Implementations§
Source§impl Ord for WString
impl Ord for WString
Source§impl PartialOrd for WString
impl PartialOrd for WString
impl Eq for WString
impl StructuralPartialEq for WString
Auto Trait Implementations§
impl Freeze for WString
impl RefUnwindSafe for WString
impl Send for WString
impl Sync for WString
impl Unpin for WString
impl UnsafeUnpin for WString
impl UnwindSafe for WString
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