MCPcopy Create free account
hub / github.com/PLSysSec/wave / to_wasi

Method to_wasi

src/types/mod.rs:533–544  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

531
532impl Filetype {
533 pub fn to_wasi(&self) -> u8 {
534 match self {
535 Filetype::Unknown => 0,
536 Filetype::BlockDevice => 1,
537 Filetype::CharacterDevice => 2,
538 Filetype::Directory => 3,
539 Filetype::RegularFile => 4,
540 Filetype::SocketDgram => 5,
541 Filetype::SocketStream => 6,
542 Filetype::SymbolicLink => 7,
543 }
544 }
545}
546
547impl From<libc::mode_t> for Filetype {

Calls

no outgoing calls

Tested by

no test coverage detected