Module unsafe_io::os::windows[][src]

Expand description

The RawHandleOrSocket type and accompanying AsRawHandleOrSocket, IntoRawHandleOrSocket, and FromRawHandleOrSocket traits. These provide minimal Windows analogs for the Posix-ish RawFd type and accompanying AsRawFd, IntoRawFd, and FromRawFd traits.

These types are only defined on Windows and do not require implementors to assert that they own their resources. See UnsafeHandle and accompanying AsUnsafeHandle, IntoRawHandle, and FromUnsafeHandle traits for platform-independent interfaces which do include ownership assertions.

Structs

HandleOrSocket variant of io-lifetimes’ BorrowedHandle/BorrowedSocket.

HandleOrSocket variant of io-lifetimes’ BorrowedHandle/BorrowedSocket.

A Windows analog for the Posix-ish AsRawFd type. Unlike Posix-ish platforms which have a single type for files and sockets, Windows has distinct types, RawHandle and RawSocket. And unlike Posix-ish platforms where text streams are generally UTF-8, the Windows Console is UTF-16. This type behaves like an enum which can hold either a handle or a socket, and to which UTF-8 text can be written.

Traits

Like AsHandle and AsSocket, but implementable by types which can implement either one.

Like AsRawHandle and AsRawSocket, but implementable by types which can implement either one.

Like AsRawHandleOrSocket, but for types which may have one or two handles or sockets, for reading and writing.

Like AsHandleOrSocket, but for types which may have one or two handles or sockets, for reading and writing.

Like FromHandle and FromSocket, but implementable by types which can implement both.

Like FromRawHandle and FromRawSocket, but implementable by types which can implement both.

Like IntoHandle and IntoSocket, but implementable by types which can implement either one.

Like IntoRawHandle and IntoRawSocket, but implementable by types which can implement either one.