Trait wasmtime_wasi::preview2::StdoutStream
source · pub trait StdoutStream: Send {
// Required methods
fn stream(&self) -> Box<dyn HostOutputStream>;
fn isatty(&self) -> bool;
}
Expand description
Similar to StdinStream
, except for output.
Required Methods§
sourcefn stream(&self) -> Box<dyn HostOutputStream>
fn stream(&self) -> Box<dyn HostOutputStream>
Returns a fresh new stream which can write to this output stream.
Note that all output streams should output to the same logical source. This means that it’s possible for each independent stream to acquire a separate “permit” to write and then act on that permit. Note that additionally at this time once a permit is “acquired” there’s no way to release it, for example you can wait for readiness and then never actually write in WASI. This means that acquisition of a permit for one stream cannot discount the size of a permit another stream could obtain.
Implementations must be able to handle this