Struct wasi_common::sync::WasiCtxBuilder
source · pub struct WasiCtxBuilder { /* private fields */ }
Implementations§
source§impl WasiCtxBuilder
impl WasiCtxBuilder
pub fn new() -> Self
pub fn env( &mut self, var: &str, value: &str ) -> Result<&mut Self, StringArrayError>
pub fn envs( &mut self, env: &[(String, String)] ) -> Result<&mut Self, StringArrayError>
pub fn inherit_env(&mut self) -> Result<&mut Self, StringArrayError>
pub fn arg(&mut self, arg: &str) -> Result<&mut Self, StringArrayError>
pub fn args(&mut self, arg: &[String]) -> Result<&mut Self, StringArrayError>
pub fn inherit_args(&mut self) -> Result<&mut Self, StringArrayError>
pub fn stdin(&mut self, f: Box<dyn WasiFile>) -> &mut Self
pub fn stdout(&mut self, f: Box<dyn WasiFile>) -> &mut Self
pub fn stderr(&mut self, f: Box<dyn WasiFile>) -> &mut Self
pub fn inherit_stdin(&mut self) -> &mut Self
pub fn inherit_stdout(&mut self) -> &mut Self
pub fn inherit_stderr(&mut self) -> &mut Self
pub fn inherit_stdio(&mut self) -> &mut Self
pub fn preopened_dir( &mut self, dir: Dir, guest_path: impl AsRef<Path> ) -> Result<&mut Self, Error>
pub fn preopened_socket( &mut self, fd: u32, socket: impl Into<Socket> ) -> Result<&mut Self, Error>
pub fn build(&mut self) -> WasiCtx
Auto Trait Implementations§
impl Freeze for WasiCtxBuilder
impl !RefUnwindSafe for WasiCtxBuilder
impl Send for WasiCtxBuilder
impl Sync for WasiCtxBuilder
impl Unpin for WasiCtxBuilder
impl !UnwindSafe for WasiCtxBuilder
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
source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read more