Struct wasmtime_wasi::sync::WasiCtxBuilder
source · pub struct WasiCtxBuilder { /* private fields */ }
Implementations§
source§impl WasiCtxBuilder
impl WasiCtxBuilder
pub fn new() -> WasiCtxBuilder
pub fn env( &mut self, var: &str, value: &str ) -> Result<&mut WasiCtxBuilder, StringArrayError>
pub fn envs( &mut self, env: &[(String, String)] ) -> Result<&mut WasiCtxBuilder, StringArrayError>
pub fn inherit_env(&mut self) -> Result<&mut WasiCtxBuilder, StringArrayError>
pub fn arg( &mut self, arg: &str ) -> Result<&mut WasiCtxBuilder, StringArrayError>
pub fn args( &mut self, arg: &[String] ) -> Result<&mut WasiCtxBuilder, StringArrayError>
pub fn inherit_args(&mut self) -> Result<&mut WasiCtxBuilder, StringArrayError>
pub fn stdin(&mut self, f: Box<dyn WasiFile>) -> &mut WasiCtxBuilder
pub fn stdout(&mut self, f: Box<dyn WasiFile>) -> &mut WasiCtxBuilder
pub fn stderr(&mut self, f: Box<dyn WasiFile>) -> &mut WasiCtxBuilder
pub fn inherit_stdin(&mut self) -> &mut WasiCtxBuilder
pub fn inherit_stdout(&mut self) -> &mut WasiCtxBuilder
pub fn inherit_stderr(&mut self) -> &mut WasiCtxBuilder
pub fn inherit_stdio(&mut self) -> &mut WasiCtxBuilder
pub fn preopened_dir( &mut self, dir: Dir, guest_path: impl AsRef<Path> ) -> Result<&mut WasiCtxBuilder, Error>
pub fn preopened_socket( &mut self, fd: u32, socket: impl Into<Socket> ) -> Result<&mut WasiCtxBuilder, 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