Struct windows_core::PCWSTR
#[repr(transparent)]pub struct PCWSTR(pub *const u16);
Expand description
A pointer to a constant null-terminated string of 16-bit Unicode characters.
Tuple Fields§
§0: *const u16
Implementations§
§impl PCWSTR
impl PCWSTR
pub const fn null() -> Self
pub const fn null() -> Self
Construct a null PCWSTR
pub unsafe fn as_wide(&self) -> &[u16]
pub unsafe fn as_wide(&self) -> &[u16]
String data without the trailing 0
Safety
The PCWSTR
’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 PCWSTR
impl Eq for PCWSTR
impl StructuralEq for PCWSTR
impl StructuralPartialEq for PCWSTR
Auto Trait Implementations§
impl RefUnwindSafe for PCWSTR
impl !Send for PCWSTR
impl !Sync for PCWSTR
impl Unpin for PCWSTR
impl UnwindSafe for PCWSTR
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