Struct windows::HRESULT[][src]

#[repr(transparent)]
#[must_use]
pub struct HRESULT(pub u32);
Expand description

A primitive error code value returned by most COM functions.

Implementations

Returns true if self is a success code.

Returns true if self is a failure code.

Asserts that self is a success code.

This will invoke the panic! macro if self is a failure code and display the HRESULT value for diagnostics.

Converts the HRESULT to Result<()>.

Returns the Option as a Result if the option is a Some value, returning a suitable error if not.

Calls op if self is a success code, otherwise returns HRESULT converted to Result<T>.

If the Result is Ok converts the T::Abi into T.

Retrieves the error code stored on the calling thread.

Creates a failure code with the provided win32 error code.

This is equivalent to HRESULT_FROM_WIN32.

The error message describing the error.

Trait Implementations

The abi representation of the implementing type. Read more

Casts the Rust object to its ABI type without copying the object.

Returns a pointer for setting the object’s value via an ABI call.

Casts the ABI representation to a Rust object by taking ownership of the bits.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.