Struct OwnedHandle
1.63.0 · Source
pub struct OwnedHandle { /* private fields */ }Available on Windows only.
Expand description
An owned handle.
This closes the handle on drop.
Note that it may have the value -1, which in OwnedHandle always
represents a valid handle value, such as the current process handle, and
not INVALID_HANDLE_VALUE, despite the two having the same value. See
here for the full story.
And, it may have the value NULL (0), which can occur when consoles are
detached from processes, or when windows_subsystem is used.
OwnedHandle uses CloseHandle to close its handle on drop. As such,
it must not be used with handles to open registry keys which need to be
closed with RegCloseKey instead.
1.74.0 · Source§Creates a ChildStderr from the provided OwnedHandle.
Creates a ChildStderr from the provided OwnedHandle.
The provided handle must be asynchronous, as reading and writing from and to it is implemented using asynchronous APIs.
1.74.0 · Source§Creates a ChildStdin from the provided OwnedHandle.
Creates a ChildStdin from the provided OwnedHandle.
The provided handle must be asynchronous, as reading and writing from and to it is implemented using asynchronous APIs.
1.74.0 · Source§Creates a ChildStdout from the provided OwnedHandle.
Creates a ChildStdout from the provided OwnedHandle.
The provided handle must be asynchronous, as reading and writing from and to it is implemented using asynchronous APIs.