#[repr(transparent)]pub struct HRESULT(pub i32);Expand description
An error code value returned by most COM functions.
Tuple Fields§
§0: i32Implementations§
Source§impl HRESULT
impl HRESULT
Sourcepub const fn from_components(severity: u32, facility: u32, code: u32) -> Self
pub const fn from_components(severity: u32, facility: u32, code: u32) -> Self
Creates an HRESULT from its severity, facility, and code, like MAKE_HRESULT.
Severity is 0 for success and 1 for failure. Inputs are combined using 32-bit shifts and bitwise OR, without masking or range validation.
Sourcepub fn from_thread() -> Self
pub fn from_thread() -> Self
Creates a new HRESULT from the Win32 error code returned by GetLastError().
Trait Implementations§
impl Copy for HRESULT
impl Eq for HRESULT
Source§impl From<RPC_STATUS> for HRESULT
impl From<RPC_STATUS> for HRESULT
Source§fn from(value: RPC_STATUS) -> Self
fn from(value: RPC_STATUS) -> Self
Converts to this type from the input type.
Source§impl From<WIN32_ERROR> for HRESULT
impl From<WIN32_ERROR> for HRESULT
Source§fn from(value: WIN32_ERROR) -> Self
fn from(value: WIN32_ERROR) -> Self
Converts to this type from the input type.
Source§impl Ord for HRESULT
impl Ord for HRESULT
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for HRESULT
impl PartialOrd for HRESULT
impl StructuralPartialEq for HRESULT
Auto Trait Implementations§
impl Forget for HRESULT
impl Freeze for HRESULT
impl Move for HRESULT
impl RefUnwindSafe for HRESULT
impl Send for HRESULT
impl Sync for HRESULT
impl Unpin for HRESULT
impl UnsafeUnpin for HRESULT
impl UnwindSafe for HRESULT
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