Type Definition std::os::wasi::io::RawFd[][src]

pub type RawFd = c_int;
🔬 This is a nightly-only experimental API. (wasi_ext #71213)
This is supported on WASI only.
Expand description

Raw file descriptors.

This has type c_int to ease compatibility with code that also compiles on Unix configurations, however unlike Unix and POSIX, in WASI negative file descriptors are valid. Only -1 is reserved for indicating errors. Code intending to be portable across Unix platforms and WASI should avoid assuming that negative file descriptors are invalid.

Trait Implementations

🔬 This is a nightly-only experimental API. (wasi_ext #71213)

Extracts the raw file descriptor. Read more

🔬 This is a nightly-only experimental API. (wasi_ext #71213)

Constructs a new instance of Self from the given raw file descriptor. Read more

🔬 This is a nightly-only experimental API. (wasi_ext #71213)

Consumes this object, returning the raw underlying file descriptor. Read more