pub struct WasiCtxBuilder { /* private fields */ }
Implementations§
Source§impl WasiCtxBuilder
impl WasiCtxBuilder
pub fn new() -> WasiCtxBuilder
pub fn build(self) -> WasiCtx
Sourcepub fn set_pre_open_path(
self,
real_paths: Vec<&str>,
mapped_paths: Vec<&str>,
) -> WasiCtxBuilder
pub fn set_pre_open_path( self, real_paths: Vec<&str>, mapped_paths: Vec<&str>, ) -> WasiCtxBuilder
set pre-open directories and files, which are part of WASI arguments, for the module.
the format of each map entry:
This function should be called before Instance::new
Sourcepub fn set_env_vars(self, envs: Vec<&str>) -> WasiCtxBuilder
pub fn set_env_vars(self, envs: Vec<&str>) -> WasiCtxBuilder
set environment variables, which are part of WASI arguments, for the module
This function should be called before Instance::new
all wasi args of a module will be spread into the environment variables of the module
Sourcepub fn set_allowed_dns(self, dns: Vec<&str>) -> WasiCtxBuilder
pub fn set_allowed_dns(self, dns: Vec<&str>) -> WasiCtxBuilder
set allowed ns , which are part of WASI arguments, for the module
This function should be called before Instance::new
Sourcepub fn set_allowed_address(self, addresses: Vec<&str>) -> WasiCtxBuilder
pub fn set_allowed_address(self, addresses: Vec<&str>) -> WasiCtxBuilder
set allowed ip addresses, which are part of WASI arguments, for the module
This function should be called before Instance::new
Sourcepub fn set_arguments(self, args: Vec<&str>) -> WasiCtxBuilder
pub fn set_arguments(self, args: Vec<&str>) -> WasiCtxBuilder
set arguments, which are part of WASI arguments, for the module
This function should be called before Instance::new
Trait Implementations§
Source§impl Debug for WasiCtxBuilder
impl Debug for WasiCtxBuilder
Source§impl Default for WasiCtxBuilder
impl Default for WasiCtxBuilder
Source§fn default() -> WasiCtxBuilder
fn default() -> WasiCtxBuilder
Returns the “default value” for a type. Read more
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