Trait std::os::wasi::fs::FileTypeExt

source ·
pub trait FileTypeExt {
    fn is_block_device(&self) -> bool;
    fn is_char_device(&self) -> bool;
    fn is_socket_dgram(&self) -> bool;
    fn is_socket_stream(&self) -> bool;

    fn is_socket(&self) -> bool { ... }
}
🔬This is a nightly-only experimental API. (wasi_ext #71213)
Available on WASI only.
Expand description

WASI-specific extensions for fs::FileType.

Adds support for special WASI file types such as block/character devices, pipes, and sockets.

Required Methods§

source

fn is_block_device(&self) -> bool

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

Returns true if this file type is a block device.

source

fn is_char_device(&self) -> bool

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

Returns true if this file type is a character device.

source

fn is_socket_dgram(&self) -> bool

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

Returns true if this file type is a socket datagram.

source

fn is_socket_stream(&self) -> bool

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

Returns true if this file type is a socket stream.

Provided Methods§

source

fn is_socket(&self) -> bool

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

Returns true if this file type is any type of socket.

Implementors§