pub trait WasiUnstable {
Show 45 methods
// Required methods
fn args_get(
&mut self,
mem: &mut GuestMemory<'_>,
argv: GuestPtr<GuestPtr<u8>>,
argv_buf: GuestPtr<u8>,
) -> Result<(), Error>;
fn args_sizes_get(
&mut self,
mem: &mut GuestMemory<'_>,
) -> Result<(Size, Size), Error>;
fn environ_get(
&mut self,
mem: &mut GuestMemory<'_>,
environ: GuestPtr<GuestPtr<u8>>,
environ_buf: GuestPtr<u8>,
) -> Result<(), Error>;
fn environ_sizes_get(
&mut self,
mem: &mut GuestMemory<'_>,
) -> Result<(Size, Size), Error>;
fn clock_res_get(
&mut self,
mem: &mut GuestMemory<'_>,
id: Clockid,
) -> Result<Timestamp, Error>;
fn clock_time_get(
&mut self,
mem: &mut GuestMemory<'_>,
id: Clockid,
precision: Timestamp,
) -> Result<Timestamp, Error>;
fn fd_advise<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'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(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
offset: Filesize,
len: Filesize,
) -> Result<(), Error>;
fn fd_close<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'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,
mem: &'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,
mem: &'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(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
flags: Fdflags,
) -> Result<(), Error>;
fn fd_fdstat_set_rights(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
) -> Result<(), Error>;
fn fd_filestat_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'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,
mem: &'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,
mem: &'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_pread<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'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_prestat_get(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Prestat, Error>;
fn fd_prestat_dir_name(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
path: GuestPtr<u8>,
path_len: Size,
) -> Result<(), Error>;
fn fd_pwrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
fd: Fd,
iovs: 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_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'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_readdir<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'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 fd_renumber(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
to: Fd,
) -> Result<(), Error>;
fn fd_seek<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'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,
mem: &'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(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
) -> Result<Filesize, Error>;
fn fd_write<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
fd: Fd,
iovs: 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 path_create_directory<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
mem: &'life1 mut GuestMemory<'life2>,
fd: 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,
mem: &'life1 mut GuestMemory<'life2>,
fd: 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,
mem: &'life1 mut GuestMemory<'life2>,
fd: 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,
mem: &'life1 mut GuestMemory<'life2>,
old_fd: Fd,
old_flags: Lookupflags,
old_path: GuestPtr<str>,
new_fd: Fd,
new_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,
mem: &'life1 mut GuestMemory<'life2>,
fd: 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,
mem: &'life1 mut GuestMemory<'life2>,
fd: 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,
mem: &'life1 mut GuestMemory<'life2>,
fd: 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,
mem: &'life1 mut GuestMemory<'life2>,
fd: Fd,
old_path: GuestPtr<str>,
new_fd: Fd,
new_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,
mem: &'life1 mut GuestMemory<'life2>,
old_path: GuestPtr<str>,
fd: Fd,
new_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,
mem: &'life1 mut GuestMemory<'life2>,
fd: 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,
mem: &'life1 mut GuestMemory<'life2>,
in_: GuestPtr<Subscription>,
out: 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(&mut self, mem: &mut GuestMemory<'_>, rval: Exitcode) -> Error;
fn proc_raise(
&mut self,
mem: &mut GuestMemory<'_>,
sig: Signal,
) -> Result<(), Error>;
fn sched_yield(&mut self, mem: &mut GuestMemory<'_>) -> Result<(), Error>;
fn random_get(
&mut self,
mem: &mut GuestMemory<'_>,
buf: GuestPtr<u8>,
buf_len: Size,
) -> Result<(), Error>;
fn sock_recv(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
ri_data: IovecArray,
ri_flags: Riflags,
) -> Result<(Size, Roflags), Error>;
fn sock_send(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
si_data: CiovecArray,
si_flags: Siflags,
) -> Result<Size, Error>;
fn sock_shutdown(
&mut self,
mem: &mut GuestMemory<'_>,
fd: Fd,
how: Sdflags,
) -> Result<(), Error>;
}
Available on crate feature
preview1
only.