[−][src]Type Definition comedy::error::HResult
type HResult = ErrorAndSource<HResultInner>;
An HRESULT error code. These usually come from COM APIs.
Includes optional function name, source file name, and line number. See
ErrorAndSource
for additional methods.
Methods
impl HResult
[src]
pub fn new(hr: HRESULT) -> Self
[src]
Create from an HRESULT
.
pub fn extract_code(&self) -> HRESULT
[src]
Get the result code portion of the HRESULT
pub fn extract_facility(&self) -> HRESULT
[src]
Get the facility portion of the HRESULT
pub fn try_into_win32_err(self) -> Result<Win32Error, Self>
[src]
If the HResult
corresponds to a Win32 error, convert.
Returns the original HResult
as an error on failure.