docs

v0.1.0 문서를 보고 있습니다. 이 버전은 더 이상 지원하지 않습니다. 최신 릴리스: v0.1.3 →

std::os::windows::io

이 페이지의 내용

API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.

raw handles and sockets. File, the child pipes and the standard streams implement AsRawHandle; the TCP and UDP sockets AsRawSocket. FromRaw* takes ownership of a value and IntoRaw* gives it up. The values are the full pointer-sized HANDLE and the SOCKET as Win32 gives them.

Traits

AsRawHandleSource

pub trait AsRawHandle

The HANDLE behind a handle, still owned by it (INVALID_HANDLE_VALUE, -1, once the handle is closed).

FromRawHandleSource

pub trait FromRawHandle

A handle that owns HANDLE h from now on: closing the handle closes h.

  • unsafe fn from_raw_handle(h: RawHandle) -> Self§

    Source

    Safety: h must be an open kernel handle, and nothing else may close it.

IntoRawHandleSource

pub trait IntoRawHandle

A handle that gives up its HANDLE: the handle is consumed and nothing closes the HANDLE; the caller owns it.

  • fn into_raw_handle(self) -> RawHandle§

    Source

    The HANDLE, now the caller's to close (INVALID_HANDLE_VALUE if self was closed).

AsRawSocketSource

pub trait AsRawSocket

The SOCKET behind a socket, still owned by it (INVALID_SOCKET once it is closed).

FromRawSocketSource

pub trait FromRawSocket

A socket that owns SOCKET s from now on: closing it closes s.

  • unsafe fn from_raw_socket(s: RawSocket) -> Self§

    Source

    Safety: s must be an open socket of the right kind, and nothing else may close it.

IntoRawSocketSource

pub trait IntoRawSocket

A socket that gives up its SOCKET: the socket is consumed and nothing closes the SOCKET; the caller owns it.

  • fn into_raw_socket(self) -> RawSocket§

    Source

    The SOCKET, now the caller's to close (INVALID_SOCKET if self was closed).

Type aliases

RawHandleSource

pub type RawHandle = isize

A Win32 HANDLE.

RawSocketSource

pub type RawSocket = u64

A Winsock SOCKET.