#[non_exhaustive]pub enum FailureCode {
Win32(u32),
HResult(i32),
}Expand description
A Win32 error code or an HRESULT, kept in the currency it actually arrived in (D-79).
Every failure source in this crate today (CreateFileW,
ReadDirectoryChangesW, FindFirstChangeNotificationW,
GetVolumeInformationByHandleW, ReOpenFile) is a classic last-error API, so
only Win32 is produced today – but a code is kept in
whichever currency it actually arrived in rather than forced through
HRESULT_FROM_WIN32/HRESULT_CODE into a single shape, either direction of
which is lossy.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Win32(u32)
A WIN32_ERROR from a classic last-error API.
HResult(i32)
An HRESULT from a COM-style API. Nothing in this crate produces one
today; the variant exists so a future source does not need a breaking
change to be represented.
Trait Implementations§
Source§impl Clone for FailureCode
impl Clone for FailureCode
impl Copy for FailureCode
Source§impl Debug for FailureCode
impl Debug for FailureCode
impl Eq for FailureCode
Source§impl Hash for FailureCode
impl Hash for FailureCode
Source§impl PartialEq for FailureCode
impl PartialEq for FailureCode
impl StructuralPartialEq for FailureCode
Auto Trait Implementations§
impl Forget for FailureCode
impl Freeze for FailureCode
impl Move for FailureCode
impl RefUnwindSafe for FailureCode
impl Send for FailureCode
impl Sync for FailureCode
impl Unpin for FailureCode
impl UnsafeUnpin for FailureCode
impl UnwindSafe for FailureCode
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