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
impl HRESULT[src]
impl HRESULT[src]pub fn unwrap(self)[src]
pub fn unwrap(self)[src]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.
pub fn and_some<T: Interface>(self, some: Option<T>) -> Result<T>[src]
pub fn and_some<T: Interface>(self, some: Option<T>) -> Result<T>[src]Returns the Option as a Result if the option is a Some value, returning
a suitable error if not.
pub fn and_then<F, T>(self, op: F) -> Result<T> where
F: FnOnce() -> T, [src]
pub fn and_then<F, T>(self, op: F) -> Result<T> where
F: FnOnce() -> T, [src]Calls op if self is a success code, otherwise returns HRESULT
converted to Result<T>.
pub unsafe fn from_abi<T: Abi>(self, abi: T::Abi) -> Result<T>[src]
pub unsafe fn from_abi<T: Abi>(self, abi: T::Abi) -> Result<T>[src]If the Result is Ok converts the T::Abi into T.
pub fn from_thread() -> Self[src]
pub fn from_thread() -> Self[src]Retrieves the error code stored on the calling thread.
pub fn from_win32(error: u32) -> Self[src]
pub fn from_win32(error: u32) -> Self[src]Creates a failure code with the provided win32 error code.
This is equivalent to HRESULT_FROM_WIN32.
Trait Implementations
impl Abi for HRESULT[src]
impl Abi for HRESULT[src]impl Copy for HRESULT[src]
impl StructuralPartialEq for HRESULT[src]
Auto Trait Implementations
impl RefUnwindSafe for HRESULT
impl Send for HRESULT
impl Sync for HRESULT
impl Unpin for HRESULT
impl UnwindSafe for HRESULT
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more