pub struct WasiCtx(/* private fields */);
Expand description
An Arc
-wrapper around the wasi-common context to allow mutable access to
the file descriptor table. This wrapper is only necessary due to the
signature of fd_fdstat_set_flags
; if that changes, there are a variety of
improvements that can be made (TODO:
https://github.com/bytecodealliance/wasmtime/issues/5643).
Implementations§
Source§impl WasiCtx
impl WasiCtx
pub fn new( random: Box<dyn RngCore + Send + Sync>, clocks: WasiClocks, sched: Box<dyn WasiSched>, table: Table, ) -> Self
pub fn insert_file( &self, fd: u32, file: Box<dyn WasiFile>, access_mode: FileAccessMode, )
pub fn push_file( &self, file: Box<dyn WasiFile>, access_mode: FileAccessMode, ) -> Result<u32, Error>
pub fn insert_dir(&self, fd: u32, dir: Box<dyn WasiDir>, path: PathBuf)
pub fn push_dir( &self, dir: Box<dyn WasiDir>, path: PathBuf, ) -> Result<u32, Error>
pub fn table(&self) -> &Table
pub fn table_mut(&mut self) -> Option<&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(&self, f: Box<dyn WasiFile>)
pub fn set_stdout(&self, f: Box<dyn WasiFile>)
pub fn set_stderr(&self, f: Box<dyn WasiFile>)
pub fn push_preopened_dir( &self, dir: Box<dyn WasiDir>, path: impl AsRef<Path>, ) -> Result<(), Error>
Trait Implementations§
Source§impl WasiSnapshotPreview1 for WasiCtx
impl WasiSnapshotPreview1 for WasiCtx
fn args_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
argv: GuestPtr<GuestPtr<u8>>,
argv_buf: GuestPtr<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn args_sizes_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(Size, Size), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn environ_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
environ: GuestPtr<GuestPtr<u8>>,
environ_buf: GuestPtr<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn environ_sizes_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(Size, Size), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn clock_res_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
id: Clockid,
) -> Pin<Box<dyn Future<Output = Result<Timestamp, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn clock_time_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
id: Clockid,
precision: Timestamp,
) -> Pin<Box<dyn Future<Output = Result<Timestamp, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_advise<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_allocate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
_offset: Filesize,
_len: Filesize,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_close<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_datasync<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_fdstat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Fdstat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_fdstat_set_flags<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
flags: Fdflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_fdstat_set_rights<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
_fs_rights_base: Rights,
_fs_rights_inheriting: Rights,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_filestat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_filestat_set_size<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
size: Filesize,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_filestat_set_times<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
iovs: IovecArray,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_pread<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
iovs: IovecArray,
offset: Filesize,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
ciovs: CiovecArray,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_pwrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
ciovs: CiovecArray,
offset: Filesize,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_prestat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Prestat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_prestat_dir_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
path: GuestPtr<u8>,
path_max_len: Size,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_renumber<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
from: Fd,
to: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_seek<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
offset: Filedelta,
whence: Whence,
) -> Pin<Box<dyn Future<Output = Result<Filesize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_sync<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_tell<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Filesize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_readdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
buf: GuestPtr<u8>,
buf_len: Size,
cookie: Dircookie,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_create_directory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_filestat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_filestat_set_times<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
src_fd: Fd,
src_flags: Lookupflags,
src_path: GuestPtr<str>,
target_fd: Fd,
target_path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
dirflags: Lookupflags,
path: GuestPtr<str>,
oflags: Oflags,
fs_rights_base: Rights,
_fs_rights_inheriting: Rights,
fdflags: Fdflags,
) -> Pin<Box<dyn Future<Output = Result<Fd, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_readlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
buf: GuestPtr<u8>,
buf_len: Size,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_remove_directory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
src_fd: Fd,
src_path: GuestPtr<str>,
dest_fd: Fd,
dest_path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_symlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
src_path: GuestPtr<str>,
dirfd: Fd,
dest_path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_unlink_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn poll_oneoff<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
subs: GuestPtr<Subscription>,
events: GuestPtr<Event>,
nsubscriptions: Size,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn proc_exit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
status: Exitcode,
) -> Pin<Box<dyn Future<Output = Error> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn proc_raise<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
_sig: Signal,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sched_yield<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn random_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
buf: GuestPtr<u8>,
buf_len: Size,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sock_accept<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
flags: Fdflags,
) -> Pin<Box<dyn Future<Output = Result<Fd, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sock_recv<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
ri_data: IovecArray,
ri_flags: Riflags,
) -> Pin<Box<dyn Future<Output = Result<(Size, Roflags), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sock_send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
si_data: CiovecArray,
_si_flags: Siflags,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sock_shutdown<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
how: Sdflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§impl WasiUnstable for WasiCtx
impl WasiUnstable for WasiCtx
fn args_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
argv: GuestPtr<GuestPtr<u8>>,
argv_buf: GuestPtr<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn args_sizes_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(Size, Size), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn environ_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
environ: GuestPtr<GuestPtr<u8>>,
environ_buf: GuestPtr<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn environ_sizes_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(Size, Size), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn clock_res_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
id: Clockid,
) -> Pin<Box<dyn Future<Output = Result<Timestamp, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn clock_time_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
id: Clockid,
precision: Timestamp,
) -> Pin<Box<dyn Future<Output = Result<Timestamp, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_advise<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_allocate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
offset: Filesize,
len: Filesize,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_close<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_datasync<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_fdstat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Fdstat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_fdstat_set_flags<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
flags: Fdflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_fdstat_set_rights<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_filestat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_filestat_set_size<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
size: Filesize,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_filestat_set_times<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
iovs: IovecArray,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_pread<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
iovs: IovecArray,
offset: Filesize,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
ciovs: CiovecArray,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_pwrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
ciovs: CiovecArray,
offset: Filesize,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_prestat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Prestat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_prestat_dir_name<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
path: GuestPtr<u8>,
path_max_len: Size,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_renumber<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
from: Fd,
to: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_seek<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
offset: Filedelta,
whence: Whence,
) -> Pin<Box<dyn Future<Output = Result<Filesize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_sync<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_tell<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
) -> Pin<Box<dyn Future<Output = Result<Filesize, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fd_readdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
fd: Fd,
buf: GuestPtr<u8>,
buf_len: Size,
cookie: Dircookie,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_create_directory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_filestat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_filestat_set_times<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
flags: Lookupflags,
path: GuestPtr<str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_link<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
src_fd: Fd,
src_flags: Lookupflags,
src_path: GuestPtr<str>,
target_fd: Fd,
target_path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_open<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
dirflags: Lookupflags,
path: GuestPtr<str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags,
) -> Pin<Box<dyn Future<Output = Result<Fd, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_readlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
buf: GuestPtr<u8>,
buf_len: Size,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_remove_directory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_rename<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
src_fd: Fd,
src_path: GuestPtr<str>,
dest_fd: Fd,
dest_path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_symlink<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
src_path: GuestPtr<str>,
dirfd: Fd,
dest_path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn path_unlink_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
dirfd: Fd,
path: GuestPtr<str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn poll_oneoff<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
subs: GuestPtr<Subscription>,
events: GuestPtr<Event>,
nsubscriptions: Size,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn proc_exit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
status: Exitcode,
) -> Pin<Box<dyn Future<Output = Error> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn proc_raise<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
_sig: Signal,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sched_yield<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn random_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
memory: &'life1 mut GuestMemory<'life2>,
buf: GuestPtr<u8>,
buf_len: Size,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sock_recv<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
_fd: Fd,
_ri_data: IovecArray,
_ri_flags: Riflags,
) -> Pin<Box<dyn Future<Output = Result<(Size, Roflags), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sock_send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
_fd: Fd,
_si_data: CiovecArray,
_si_flags: Siflags,
) -> Pin<Box<dyn Future<Output = Result<Size, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn sock_shutdown<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
_memory: &'life1 mut GuestMemory<'life2>,
_fd: Fd,
_how: Sdflags,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§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.§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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more