std::os::windows::io

Trait AsRawHandle

1.0.0 · Source
pub trait AsRawHandle {
    // Required method
    fn as_raw_handle(&self) -> RawHandle;
}
Available on Windows only.
Expand description

Extracts raw handles.

Required Methods§

1.0.0 · Source

fn as_raw_handle(&self) -> RawHandle

Extracts the raw handle.

This function is typically used to borrow an owned handle. When used in this way, this method does not pass ownership of the raw handle to the caller, and the handle is only guaranteed to be valid while the original object has not yet been destroyed.

This function may return null, such as when called on Stdin, Stdout, or Stderr when the console is detached.

However, borrowing is not strictly required. See AsHandle::as_handle for an API which strictly borrows a handle.

Implementors§

1.0.0 · Source§

impl AsRawHandle for File

1.21.0 · Source§

impl AsRawHandle for Stderr

1.21.0 · Source§

impl AsRawHandle for Stdin

1.21.0 · Source§

impl AsRawHandle for Stdout

1.2.0 · Source§

impl AsRawHandle for Child

1.2.0 · Source§

impl AsRawHandle for ChildStderr

1.2.0 · Source§

impl AsRawHandle for ChildStdin

1.2.0 · Source§

impl AsRawHandle for ChildStdout

1.63.0 · Source§

impl AsRawHandle for BorrowedHandle<'_>

1.63.0 · Source§

impl AsRawHandle for OwnedHandle

1.35.0 · Source§

impl<'a> AsRawHandle for StderrLock<'a>

1.35.0 · Source§

impl<'a> AsRawHandle for StdinLock<'a>

1.35.0 · Source§

impl<'a> AsRawHandle for StdoutLock<'a>

1.9.0 · Source§

impl<T> AsRawHandle for JoinHandle<T>