Struct windows_core::HSTRING
pub struct HSTRING(/* private fields */);
Expand description
An (HSTRING) is a reference-counted and immutable UTF-16 string type.
Implementations§
source§impl HSTRING
impl HSTRING
sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the length of the string. The length is measured in u16
s (UTF-16 code units), not including the terminating null character.
sourcepub fn from_wide(value: &[u16]) -> Result<HSTRING, Error>
pub fn from_wide(value: &[u16]) -> Result<HSTRING, Error>
Create a HSTRING
from a slice of 16 bit characters (wchars).
sourcepub fn to_string_lossy(&self) -> String
pub fn to_string_lossy(&self) -> String
Get the contents of this HSTRING
as a String lossily.
sourcepub fn to_os_string(&self) -> OsString
pub fn to_os_string(&self) -> OsString
Get the contents of this HSTRING
as a OsString.
Trait Implementations§
source§impl From<HStringBuilder> for HSTRING
impl From<HStringBuilder> for HSTRING
source§fn from(value: HStringBuilder) -> HSTRING
fn from(value: HStringBuilder) -> HSTRING
Converts to this type from the input type.
source§impl Ord for HSTRING
impl Ord for HSTRING
source§impl PartialEq<&HSTRING> for OsStr
impl PartialEq<&HSTRING> for OsStr
source§impl PartialEq<&HSTRING> for str
impl PartialEq<&HSTRING> for str
source§impl PartialEq<&OsStr> for HSTRING
impl PartialEq<&OsStr> for HSTRING
source§impl PartialEq<&OsString> for HSTRING
impl PartialEq<&OsString> for HSTRING
source§impl PartialEq<&String> for HSTRING
impl PartialEq<&String> for HSTRING
source§impl PartialEq<&str> for HSTRING
impl PartialEq<&str> for HSTRING
source§impl PartialEq<HSTRING> for &OsStr
impl PartialEq<HSTRING> for &OsStr
source§impl PartialEq<HSTRING> for &str
impl PartialEq<HSTRING> for &str
source§impl PartialEq<HSTRING> for OsStr
impl PartialEq<HSTRING> for OsStr
source§impl PartialEq<HSTRING> for str
impl PartialEq<HSTRING> for str
source§impl PartialEq<OsStr> for &HSTRING
impl PartialEq<OsStr> for &HSTRING
source§impl PartialEq<OsStr> for HSTRING
impl PartialEq<OsStr> for HSTRING
source§impl PartialEq<OsString> for &HSTRING
impl PartialEq<OsString> for &HSTRING
source§impl PartialEq<OsString> for HSTRING
impl PartialEq<OsString> for HSTRING
source§impl PartialEq<String> for &HSTRING
impl PartialEq<String> for &HSTRING
source§impl PartialEq<String> for HSTRING
impl PartialEq<String> for HSTRING
source§impl PartialEq for HSTRING
impl PartialEq for HSTRING
source§impl PartialOrd for HSTRING
impl PartialOrd for HSTRING
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for HSTRING
impl Param<PCWSTR> for &HSTRING
impl Send for HSTRING
impl Sync for HSTRING
Auto Trait Implementations§
impl Freeze for HSTRING
impl RefUnwindSafe for HSTRING
impl Unpin for HSTRING
impl UnwindSafe for HSTRING
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)