Module prelude

1.0.0 · Source
Expand description

A prelude for conveniently writing platform-specific code.

Includes all extension traits, and some important type definitions.

Structs§

BorrowedHandle
A borrowed handle.
BorrowedSocket
A borrowed socket.
HandleOrInvalid
FFI type for handles in return values or out parameters, where INVALID_HANDLE_VALUE is used as a sentry value to indicate errors, such as in the return value of CreateFileW. This uses repr(transparent) and has the representation of a host handle, so that it can be used in such FFI declarations.
OwnedHandle
An owned handle.
OwnedSocket
An owned socket.

Traits§

AsHandle
A trait to borrow the handle from an underlying object.
AsRawHandle
Extracts raw handles.
AsRawSocket
Extracts raw sockets.
AsSocket
A trait to borrow the socket from an underlying object.
FileExt
Windows-specific extensions to fs::File.
FromRawHandle
Constructs I/O objects from raw handles.
FromRawSocket
Creates I/O objects from raw sockets.
IntoRawHandle
A trait to express the ability to consume an object and acquire ownership of its raw HANDLE.
IntoRawSocket
A trait to express the ability to consume an object and acquire ownership of its raw SOCKET.
MetadataExt
Windows-specific extensions to fs::Metadata.
OpenOptionsExt
Windows-specific extensions to fs::OpenOptions.
OsStrExt
Windows-specific extensions to OsStr.
OsStringExt
Windows-specific extensions to OsString.

Type Aliases§

RawHandle
Raw HANDLEs.
RawSocket
Raw SOCKETs.