[][src]Struct windows::BString

#[repr(transparent)]pub struct BString(_);

A Basic string, sometimes called a BSTR, is a string data type used by certain COM interfaces and interop functions.

Implementations

impl BString[src]

pub fn new() -> Self[src]

Create an empty BString.

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 BString from a slice of 16 bit characters (wchars).

pub fn to_string_lossy(&self) -> String[src]

Get the contents of this BString as a String lossily.

pub fn clear(&mut self)[src]

Frees the memory occupied by the string.

Trait Implementations

impl Abi for BString[src]

type Abi = RawPtr

The abi representation of the implementing type. Read more

impl Clone for BString[src]

impl Debug for BString[src]

impl Default for BString[src]

impl Display for BString[src]

impl Drop for BString[src]

impl From<&'_ String> for BString[src]

impl From<&'_ str> for BString[src]

impl From<String> for BString[src]

impl PartialEq<&'_ str> for BString[src]

impl PartialEq<BString> for BString[src]

impl PartialEq<BString> for &str[src]

impl PartialEq<String> for BString[src]

impl PartialEq<str> for BString[src]

impl<'a> TryFrom<&'a BString> for String[src]

type Error = FromUtf16Error

The type returned in the event of a conversion error.

impl TryFrom<BString> for String[src]

type Error = FromUtf16Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for BString[src]

impl !Send for BString[src]

impl !Sync for BString[src]

impl Unpin for BString[src]

impl UnwindSafe for BString[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.