Module handle

1.63.0 · Source
Available on Windows only.
Expand description

Owned and borrowed OS handles.

Macros§

impl_is_terminal 🔒

Structs§

BorrowedHandle
A borrowed handle.
HandleOrInvalid
FFI type for handles in return values or out parameters, where INVALID_HANDLE_VALUE is used as a sentry value to indicate errors, such as in the return value of CreateFileW. This uses repr(transparent) and has the representation of a host handle, so that it can be used in such FFI declarations.
HandleOrNull
FFI type for handles in return values or out parameters, where NULL is used as a sentry value to indicate errors, such as in the return value of CreateThread. This uses repr(transparent) and has the representation of a host handle, so that it can be used in such FFI declarations.
InvalidHandleError
This is the error type used by HandleOrInvalid when attempting to convert into a handle, to indicate that the value is INVALID_HANDLE_VALUE.
NullHandleError
This is the error type used by HandleOrNull when attempting to convert into a handle, to indicate that the value is null.
OwnedHandle
An owned handle.

Traits§

AsHandle
A trait to borrow the handle from an underlying object.