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.
Re-exports§
pub use crate::read_write::AsRawReadWriteHandleOrSocket;
pub use crate::read_write::AsReadWriteHandleOrSocket;
Structs§
HandleOrSocket
variant of io-lifetimes’BorrowedHandle
/BorrowedSocket
.HandleOrSocket
variant of io-lifetimes’OwnedHandle
/OwnedSocket
.- 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
andRawSocket
. 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
AsRawHandle
andAsRawSocket
, but implementable by types which can implement either one. - Like
FromRawHandle
andFromRawSocket
, but implementable by types which can implement both. - Like
IntoRawHandle
andIntoRawSocket
, but implementable by types which can implement either one.