pub struct BStr(_);
Expand description

Represents a borrowed BSTR string.

Implementations

Unsafely creates a BStr from a BSTR pointer.

This function will cast the pointer into a BStr. The provied pointer must be a valid BSTR pointer and must be valid while the BStr is alive. The BStr must also not be moved.

Safety

The parameter must be a valid BSTR pointer. This includes both the memory layout and allocation using BSTR-compatible allocation functions.

In addition to this the pointer must be kept alive while the returned reference is in use.

Returns the pointer as a 16-bit wide character pointer.

Returns the string length in bytes.

Does not include the length prefix or the terminating zero. However any zero bytes in the middle of the string are included.

Returns the string length in characters.

Gets the BStr as a slice of 16-bit characters.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Immutably borrows from an owned value. Read more

Formats the value using the given formatter. Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more