Skip to content

Commit 1c183f6

Browse files
committed
Add docs explaining what OsOther is
1 parent b1a5bf8 commit 1c183f6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/wasi-common/src/sys/osother.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ pub(crate) trait OsOtherExt {
1515
fn from_null() -> io::Result<Box<dyn Handle>>;
1616
}
1717

18+
/// `OsOther` is something of a catch-all for everything not covered with the specific handle
19+
/// types (`OsFile`, `OsDir`, `Stdio`). It currently encapsulates handles such as OS pipes,
20+
/// sockets, streams, etc. As such, when redirecting stdio within `WasiCtxBuilder`, the redirected
21+
/// pipe should be encapsulated within this instance _and not_ `OsFile` which represents a regular
22+
/// OS file.
1823
#[derive(Debug)]
1924
pub(crate) struct OsOther {
2025
file_type: Filetype,

0 commit comments

Comments
 (0)