rust/library/std/src/sys/wasi
Josh Triplett 326ef470a8 Add IsTerminal trait to determine if a descriptor or handle is a terminal
The UNIX and WASI implementations use `isatty`. The Windows
implementation uses the same logic the `atty` crate uses, including the
hack needed to detect msys terminals.

Implement this trait for `File` and for `Stdin`/`Stdout`/`Stderr` and
their locked counterparts on all platforms. On UNIX and WASI, implement
it for `BorrowedFd`/`OwnedFd`. On Windows, implement it for
`BorrowedHandle`/`OwnedHandle`.

Based on https://github.com/rust-lang/rust/pull/91121

Co-authored-by: Matt Wilkinson <mattwilki17@gmail.com>
2022-10-15 00:35:38 +01:00
..
args.rs Auto merge of #84115 - CDirkx:rt, r=m-ou-se 2021-04-25 04:45:39 +00:00
env.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
fd.rs wasi: enable TcpListener and TcpStream 2022-01-28 13:27:30 +01:00
fs.rs Reduce CString allocations in std as much as possible 2022-10-03 11:13:17 -07:00
io.rs Add IsTerminal trait to determine if a descriptor or handle is a terminal 2022-10-15 00:35:38 +01:00
mod.rs Allow compiling the wasm32-wasi std library with atomics 2022-10-10 08:58:09 -07:00
net.rs Remove socklen_t from platforms where it's no longer used 2022-07-30 02:42:02 +02:00
os.rs fix: return type of single-threaded dummy lock must be droppable 2022-10-11 11:42:44 -07:00
stdio.rs Consolidate AsFd instances for stdio types into library/std/src/os/fd/owned.rs 2022-10-10 14:47:22 +01:00
thread.rs wasi: update to wasi 0.11.0 2022-01-28 13:27:29 +01:00
time.rs Error instead of panicking when setting file times if the passed SystemTime doesn't fit into the required type 2022-10-01 03:22:55 +01:00