Struct wasi_common::WasiCtx
source · pub struct WasiCtx { /* private fields */ }
Implementations§
source§impl WasiCtx
impl WasiCtx
sourcepub fn new<S: AsRef<str>>(args: impl Iterator<Item = S>) -> Result<Self, Error>
pub fn new<S: AsRef<str>>(args: impl Iterator<Item = S>) -> Result<Self, Error>
Make a new WasiCtx
with some default settings.
-
File descriptors 0, 1, and 2 inherit stdin, stdout, and stderr from the host process.
-
Environment variables are inherited from the host process.
To override these behaviors, use WasiCtxBuilder
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WasiCtx
impl RefUnwindSafe for WasiCtx
impl Send for WasiCtx
impl Sync for WasiCtx
impl Unpin for WasiCtx
impl UnwindSafe for WasiCtx
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more