#[non_exhaustive]pub enum HandleCaptureFailure {
NullHandle,
InvalidHandleValue,
PseudoHandle,
DuplicateHandle,
}Expand description
Why a handle could not be captured.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NullHandle
The source handle was null.
InvalidHandleValue
The source handle was INVALID_HANDLE_VALUE.
Rejected explicitly rather than passed through, because
INVALID_HANDLE_VALUE is also the current-process pseudo-handle:
DuplicateHandle would accept it and hand back a perfectly valid handle
to the current process, so an unchecked CreateFileW failure would be
captured as a successful open of something else entirely.
PseudoHandle
The source handle was one of the other Win32 pseudo-handles.
A pseudo-handle names whatever the using thread is, so duplicating one on the caller’s thread and using the result on a worker would silently change what it refers to.
DuplicateHandle
Windows refused to duplicate the source handle.
A handle that has already been closed fails here, with
ERROR_INVALID_HANDLE.
Trait Implementations§
Source§impl Clone for HandleCaptureFailure
impl Clone for HandleCaptureFailure
Source§fn clone(&self) -> HandleCaptureFailure
fn clone(&self) -> HandleCaptureFailure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more