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

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)
This is supported on WASI only.
Expand description

特定于 WASI 的 fs::FileType 的扩展。

增加了对特殊 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

Provided methods

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

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

Implementors