Struct wasmtime_wasi::WasiCtx
source · [−]pub struct WasiCtx {
pub args: StringArray,
pub env: StringArray,
pub random: Box<dyn RngCore + Send + Sync + 'static, Global>,
pub clocks: WasiClocks,
pub sched: Box<dyn WasiSched + 'static, Global>,
pub table: Table,
}
Fields
args: StringArray
env: StringArray
random: Box<dyn RngCore + Send + Sync + 'static, Global>
clocks: WasiClocks
sched: Box<dyn WasiSched + 'static, Global>
table: Table
Implementations
sourceimpl WasiCtx
impl WasiCtx
pub fn new(
random: Box<dyn RngCore + Send + Sync + 'static, Global>,
clocks: WasiClocks,
sched: Box<dyn WasiSched + 'static, Global>,
table: Table
) -> WasiCtx
pub fn insert_file(
&mut self,
fd: u32,
file: Box<dyn WasiFile + 'static, Global>,
caps: FileCaps
)
pub fn insert_dir(
&mut self,
fd: u32,
dir: Box<dyn WasiDir + 'static, Global>,
caps: DirCaps,
file_caps: FileCaps,
path: PathBuf
)
pub fn table(&mut self) -> &mut Table
pub fn push_arg(&mut self, arg: &str) -> Result<(), StringArrayError>
pub fn push_env(
&mut self,
var: &str,
value: &str
) -> Result<(), StringArrayError>
pub fn set_stdin(&mut self, f: Box<dyn WasiFile + 'static, Global>)
pub fn set_stdout(&mut self, f: Box<dyn WasiFile + 'static, Global>)
pub fn set_stderr(&mut self, f: Box<dyn WasiFile + 'static, Global>)
pub fn push_preopened_dir(
&mut self,
dir: Box<dyn WasiDir + 'static, Global>,
path: impl AsRef<Path>
) -> Result<(), Error>
Trait Implementations
sourceimpl UserErrorConversion for WasiCtx
impl UserErrorConversion for WasiCtx
sourceimpl UserErrorConversion for WasiCtx
impl UserErrorConversion for WasiCtx
sourceimpl WasiSnapshotPreview1 for WasiCtx
impl WasiSnapshotPreview1 for WasiCtx
fn args_get<'b, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
argv: &'life1 GuestPtr<'b, GuestPtr<'b, u8>>,
argv_buf: &'life2 GuestPtr<'b, u8>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn args_sizes_get<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(u32, u32), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn environ_get<'b, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
environ: &'life1 GuestPtr<'b, GuestPtr<'b, u8>>,
environ_buf: &'life2 GuestPtr<'b, u8>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'b: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn environ_sizes_get<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(u32, u32), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn clock_res_get<'life0, 'async_trait>(
&'life0 mut self,
id: Clockid
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn clock_time_get<'life0, 'async_trait>(
&'life0 mut self,
id: Clockid,
precision: u64
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_advise<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
offset: u64,
len: u64,
advice: Advice
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_allocate<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
offset: u64,
len: u64
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_close<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_datasync<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_fdstat_get<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<Fdstat, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_fdstat_set_flags<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
flags: Fdflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_fdstat_set_rights<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_filestat_get<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_filestat_set_size<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
size: u64
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_filestat_set_times<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
atim: u64,
mtim: u64,
fst_flags: Fstflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_read<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
iovs: &'life1 GuestPtr<'a, [Iovec<'a>]>
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_pread<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
iovs: &'life1 GuestPtr<'a, [Iovec<'a>]>,
offset: u64
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_write<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
ciovs: &'life1 GuestPtr<'a, [Ciovec<'a>]>
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_pwrite<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
ciovs: &'life1 GuestPtr<'a, [Ciovec<'a>]>,
offset: u64
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_prestat_get<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<Prestat, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_prestat_dir_name<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
path: &'life1 GuestPtr<'a, u8>,
path_max_len: u32
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_renumber<'life0, 'async_trait>(
&'life0 mut self,
from: Fd,
to: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_seek<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
offset: i64,
whence: Whence
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_sync<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_tell<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_readdir<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
buf: &'life1 GuestPtr<'a, u8>,
buf_len: u32,
cookie: u64
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_create_directory<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_filestat_get<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
flags: Lookupflags,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_filestat_set_times<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
flags: Lookupflags,
path: &'life1 GuestPtr<'a, str>,
atim: u64,
mtim: u64,
fst_flags: Fstflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_link<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
src_fd: Fd,
src_flags: Lookupflags,
src_path: &'life1 GuestPtr<'a, str>,
target_fd: Fd,
target_path: &'life2 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_open<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
dirflags: Lookupflags,
path: &'life1 GuestPtr<'a, str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags
) -> Pin<Box<dyn Future<Output = Result<Fd, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_readlink<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>,
buf: &'life2 GuestPtr<'a, u8>,
buf_len: u32
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_remove_directory<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_rename<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
src_fd: Fd,
src_path: &'life1 GuestPtr<'a, str>,
dest_fd: Fd,
dest_path: &'life2 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_symlink<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
src_path: &'life1 GuestPtr<'a, str>,
dirfd: Fd,
dest_path: &'life2 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_unlink_file<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn poll_oneoff<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
subs: &'life1 GuestPtr<'a, Subscription>,
events: &'life2 GuestPtr<'a, Event>,
nsubscriptions: u32
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn proc_exit<'life0, 'async_trait>(
&'life0 mut self,
status: u32
) -> Pin<Box<dyn Future<Output = Trap> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn proc_raise<'life0, 'async_trait>(
&'life0 mut self,
_sig: Signal
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn sched_yield<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn random_get<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 GuestPtr<'a, u8>,
buf_len: u32
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn sock_accept<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
flags: Fdflags
) -> Pin<Box<dyn Future<Output = Result<Fd, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn sock_recv<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
ri_data: &'life1 GuestPtr<'a, [Iovec<'a>]>,
ri_flags: Riflags
) -> Pin<Box<dyn Future<Output = Result<(u32, Roflags), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn sock_send<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
si_data: &'life1 GuestPtr<'a, [Ciovec<'a>]>,
_si_flags: u16
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn sock_shutdown<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
how: Sdflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
sourceimpl WasiUnstable for WasiCtx
impl WasiUnstable for WasiCtx
fn args_get<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
argv: &'life1 GuestPtr<'a, GuestPtr<'a, u8>>,
argv_buf: &'life2 GuestPtr<'a, u8>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn args_sizes_get<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(u32, u32), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn environ_get<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
environ: &'life1 GuestPtr<'a, GuestPtr<'a, u8>>,
environ_buf: &'life2 GuestPtr<'a, u8>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn environ_sizes_get<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(u32, u32), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn clock_res_get<'life0, 'async_trait>(
&'life0 mut self,
id: Clockid
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn clock_time_get<'life0, 'async_trait>(
&'life0 mut self,
id: Clockid,
precision: u64
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_advise<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
offset: u64,
len: u64,
advice: Advice
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_allocate<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
offset: u64,
len: u64
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_close<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_datasync<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_fdstat_get<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<Fdstat, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_fdstat_set_flags<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
flags: Fdflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_fdstat_set_rights<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_filestat_get<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_filestat_set_size<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
size: u64
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_filestat_set_times<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
atim: u64,
mtim: u64,
fst_flags: Fstflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_read<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
iovs: &'life1 GuestPtr<'a, [Iovec<'a>]>
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_pread<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
iovs: &'life1 GuestPtr<'a, [Iovec<'a>]>,
offset: u64
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_write<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
ciovs: &'life1 GuestPtr<'a, [Ciovec<'a>]>
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_pwrite<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
ciovs: &'life1 GuestPtr<'a, [Ciovec<'a>]>,
offset: u64
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_prestat_get<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<Prestat, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_prestat_dir_name<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
path: &'life1 GuestPtr<'a, u8>,
path_max_len: u32
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn fd_renumber<'life0, 'async_trait>(
&'life0 mut self,
from: Fd,
to: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_seek<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd,
offset: i64,
whence: Whence
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_sync<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_tell<'life0, 'async_trait>(
&'life0 mut self,
fd: Fd
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn fd_readdir<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
fd: Fd,
buf: &'life1 GuestPtr<'a, u8>,
buf_len: u32,
cookie: u64
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_create_directory<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_filestat_get<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
flags: Lookupflags,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_filestat_set_times<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
flags: Lookupflags,
path: &'life1 GuestPtr<'a, str>,
atim: u64,
mtim: u64,
fst_flags: Fstflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_link<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
src_fd: Fd,
src_flags: Lookupflags,
src_path: &'life1 GuestPtr<'a, str>,
target_fd: Fd,
target_path: &'life2 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_open<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
dirflags: Lookupflags,
path: &'life1 GuestPtr<'a, str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags
) -> Pin<Box<dyn Future<Output = Result<Fd, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_readlink<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>,
buf: &'life2 GuestPtr<'a, u8>,
buf_len: u32
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_remove_directory<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn path_rename<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
src_fd: Fd,
src_path: &'life1 GuestPtr<'a, str>,
dest_fd: Fd,
dest_path: &'life2 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_symlink<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
src_path: &'life1 GuestPtr<'a, str>,
dirfd: Fd,
dest_path: &'life2 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn path_unlink_file<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
dirfd: Fd,
path: &'life1 GuestPtr<'a, str>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn poll_oneoff<'a, 'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
subs: &'life1 GuestPtr<'a, Subscription>,
events: &'life2 GuestPtr<'a, Event>,
nsubscriptions: u32
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
WasiCtx: 'async_trait,
fn proc_exit<'life0, 'async_trait>(
&'life0 mut self,
status: u32
) -> Pin<Box<dyn Future<Output = Trap> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn proc_raise<'life0, 'async_trait>(
&'life0 mut self,
_sig: Signal
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn sched_yield<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
fn random_get<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 GuestPtr<'a, u8>,
buf_len: u32
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn sock_recv<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
_fd: Fd,
_ri_data: &'life1 GuestPtr<'a, [Iovec<'a>]>,
_ri_flags: Riflags
) -> Pin<Box<dyn Future<Output = Result<(u32, Roflags), Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn sock_send<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
_fd: Fd,
_si_data: &'life1 GuestPtr<'a, [Ciovec<'a>]>,
_si_flags: u16
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait, Global>> where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WasiCtx: 'async_trait,
fn sock_shutdown<'life0, 'async_trait>(
&'life0 mut self,
_fd: Fd,
_how: Sdflags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
WasiCtx: 'async_trait,
Auto Trait Implementations
impl !RefUnwindSafe for WasiCtx
impl Send for WasiCtx
impl Sync for WasiCtx
impl Unpin for WasiCtx
impl !UnwindSafe for WasiCtx
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
sourcefn 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.
sourcefn 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,
Create a new SetFdFlags
value for use with set_fd_flags
. Read more
sourcefn 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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more