We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
OptionFileHandle
1 parent 6b4dbdb commit 31f7bf8Copy full SHA for 31f7bf8
library/std/src/os/windows/io/handle.rs
@@ -58,6 +58,10 @@ pub struct OwnedHandle {
58
/// where `INVALID_HANDLE_VALUE` is used as the sentry value, and null values
59
/// are not used at all, such as in the return value of `CreateFileW`.
60
///
61
+/// The main thing you can do with an `OptionFileHandle` is to convert it into
62
+/// an `OwnedHandle` using its [`TryFrom`] implementation, and this conversion
63
+/// takes care of the check for `INVALID_HANDLE_VALUE`.
64
+///
65
/// If this holds an owned handle, it closes the handle on drop.
66
67
/// This uses `repr(transparent)` and has the representation of a host handle,
0 commit comments