Struct windows_core::PWSTR
#[repr(transparent)]pub struct PWSTR(pub *mut u16);
Expand description
A pointer to a null-terminated string of 16-bit Unicode characters.
Tuple Fields§
§0: *mut u16
Implementations§
§impl PWSTR
impl PWSTR
pub const fn null() -> Self
pub const fn null() -> Self
Construct a null PWSTR
.
pub unsafe fn as_wide(&self) -> &[u16]
pub unsafe fn as_wide(&self) -> &[u16]
String data without the trailing 0.
§Safety
The PWSTR
’s pointer needs to be valid for reads up until and including the next \0
.
pub unsafe fn to_string(&self) -> Result<String, FromUtf16Error>
pub unsafe fn to_string(&self) -> Result<String, FromUtf16Error>
pub unsafe fn to_hstring(&self) -> Result<HSTRING>
pub unsafe fn to_hstring(&self) -> Result<HSTRING>
Trait Implementations§
impl Copy for PWSTR
impl Eq for PWSTR
impl Param<PCWSTR> for PWSTR
impl StructuralPartialEq for PWSTR
Auto Trait Implementations§
impl Freeze for PWSTR
impl RefUnwindSafe for PWSTR
impl !Send for PWSTR
impl !Sync for PWSTR
impl Unpin for PWSTR
impl UnwindSafe for PWSTR
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