Trait std::os::wasi::fs::FileTypeExt[][src]

pub trait FileTypeExt {
    fn is_block_device(&self) -> bool;
fn is_character_device(&self) -> bool;
fn is_socket_dgram(&self) -> bool;
fn is_socket_stream(&self) -> bool; }
🔬 This is a nightly-only experimental API. (wasi_ext #71213)
This is supported on WASI only.
Expand description

fs::FileType 的 WASI 特定扩展。

增加了对特殊 WASI 文件类型的支持,例如 block/character 设备,管道和套接字。

Required methods

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

如果此文件类型是块设备,则返回 true

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

如果此文件类型是字符设备,则返回 true

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

如果此文件类型是套接字数据报,则返回 true

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

如果此文件类型是套接字流,则返回 true

Implementors

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