[−][src]Struct windows::ErrorCode
A primitive error code value returned by most COM functions. An ErrorCode is sometimes called an HRESULT.
Implementations
impl ErrorCode[src]
pub fn is_ok(self) -> bool[src]
Returns true if self is a success code.
pub fn is_err(self) -> bool[src]
Returns true if self is a failure code.
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 ok(self) -> Result<()>[src]
Converts the ErrorCode to Result<()>.
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]
F: FnOnce() -> T,
Calls op if self is a success code, otherwise returns ErrorCode
converted to Result<T>.
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]
Retrieves the error code stored on the calling thread.
pub const S_OK: ErrorCode[src]
The operation succeeded.
pub const CO_E_NOTINITIALIZED: ErrorCode[src]
The COM runtime has not been loaded.
pub const E_NOINTERFACE: ErrorCode[src]
The requested interface is not implemented.
pub const E_POINTER: ErrorCode[src]
A null pointer was sent or received.
Trait Implementations
impl Abi for ErrorCode[src]
type Abi = Self
The abi representation of the implementing type. Read more
fn abi(&self) -> Self::Abi[src]
fn set_abi(&mut self) -> *mut Self::Abi[src]
unsafe fn from_abi(abi: Self::Abi) -> Result<Self>[src]
impl Clone for ErrorCode[src]
impl Copy for ErrorCode[src]
impl Debug for ErrorCode[src]
impl Default for ErrorCode[src]
impl From<Error> for ErrorCode[src]
impl From<ErrorCode> for Error[src]
impl<T> From<Result<T, Error>> for ErrorCode[src]
impl PartialEq<ErrorCode> for ErrorCode[src]
impl StructuralPartialEq for ErrorCode[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorCode[src]
impl Send for ErrorCode[src]
impl Sync for ErrorCode[src]
impl Unpin for ErrorCode[src]
impl UnwindSafe for ErrorCode[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,