Struct windows::HString [−][src]
#[repr(transparent)]pub struct HString(_);
A WinRT string, sometimes called an HSTRING, is reference-counted and logically immutable. It should only be used for communicating with WinRT APIs.
Implementations
impl HString
[src]
impl HString
[src]pub fn new() -> Self
[src]
Create an empty HString
.
This function does no allocation.
pub fn is_empty(&self) -> bool
[src]
Returns true
if the string is empty.
pub fn len(&self) -> usize
[src]
Returns the length of self
.
pub fn as_wide(&self) -> &[u16]ⓘ
[src]
Get the string as 16-bit wide characters (wchars).
pub fn from_wide(value: &[u16]) -> Self
[src]
Create a HString
from a slice of 16 bit characters (wchars).
pub fn to_string_lossy(&self) -> String
[src]
Get the contents of this HString
as a String lossily.
pub fn clear(&mut self)
[src]
Clear the contents of the string and free the memory if self
holds the
last reference to the string data.
Trait Implementations
impl Clone for HString
[src]
impl Clone for HString
[src]fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl RuntimeType for HString
[src]
impl RuntimeType for HString
[src]type DefaultType = Self
const SIGNATURE: ConstBuffer
[src]
Auto Trait Implementations
impl RefUnwindSafe for HString
impl RefUnwindSafe for HString
impl UnwindSafe for HString
impl UnwindSafe for HString