Struct wasi_common::WasiCtx [−][src]
pub struct WasiCtx { pub args: StringArray, pub env: StringArray, pub random: RefCell<Box<dyn RngCore>>, pub clocks: WasiClocks, pub sched: Box<dyn WasiSched>, pub table: Rc<RefCell<Table>>, }
Fields
args: StringArray
env: StringArray
random: RefCell<Box<dyn RngCore>>
clocks: WasiClocks
sched: Box<dyn WasiSched>
table: Rc<RefCell<Table>>
Implementations
impl WasiCtx
[src]
impl WasiCtx
[src]pub fn builder(
random: RefCell<Box<dyn RngCore>>,
clocks: WasiClocks,
sched: Box<dyn WasiSched>,
table: Rc<RefCell<Table>>
) -> WasiCtxBuilder
[src]
random: RefCell<Box<dyn RngCore>>,
clocks: WasiClocks,
sched: Box<dyn WasiSched>,
table: Rc<RefCell<Table>>
) -> WasiCtxBuilder
pub fn insert_file(&self, fd: u32, file: Box<dyn WasiFile>, caps: FileCaps)
[src]
pub fn insert_dir(
&self,
fd: u32,
dir: Box<dyn WasiDir>,
caps: DirCaps,
file_caps: FileCaps,
path: PathBuf
)
[src]
&self,
fd: u32,
dir: Box<dyn WasiDir>,
caps: DirCaps,
file_caps: FileCaps,
path: PathBuf
)
pub fn table(&self) -> RefMut<'_, Table>
[src]
Trait Implementations
impl UserErrorConversion for WasiCtx
[src]
impl UserErrorConversion for WasiCtx
[src]impl UserErrorConversion for WasiCtx
[src]
impl UserErrorConversion for WasiCtx
[src]impl<'a> WasiSnapshotPreview1 for WasiCtx
[src]
impl<'a> WasiSnapshotPreview1 for WasiCtx
[src]fn args_get<'b>(
&self,
argv: &GuestPtr<'b, GuestPtr<'b, u8>>,
argv_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
[src]
&self,
argv: &GuestPtr<'b, GuestPtr<'b, u8>>,
argv_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
fn args_sizes_get(&self) -> Result<(Size, Size), Error>
[src]
fn environ_get<'b>(
&self,
environ: &GuestPtr<'b, GuestPtr<'b, u8>>,
environ_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
[src]
&self,
environ: &GuestPtr<'b, GuestPtr<'b, u8>>,
environ_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
fn environ_sizes_get(&self) -> Result<(Size, Size), Error>
[src]
fn clock_res_get(&self, id: Clockid) -> Result<Timestamp, Error>
[src]
fn clock_time_get(
&self,
id: Clockid,
precision: Timestamp
) -> Result<Timestamp, Error>
[src]
&self,
id: Clockid,
precision: Timestamp
) -> Result<Timestamp, Error>
fn fd_advise(
&self,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice
) -> Result<(), Error>
[src]
&self,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice
) -> Result<(), Error>
fn fd_allocate(
&self,
fd: Fd,
offset: Filesize,
len: Filesize
) -> Result<(), Error>
[src]
&self,
fd: Fd,
offset: Filesize,
len: Filesize
) -> Result<(), Error>
fn fd_close(&self, fd: Fd) -> Result<(), Error>
[src]
fn fd_datasync(&self, fd: Fd) -> Result<(), Error>
[src]
fn fd_fdstat_get(&self, fd: Fd) -> Result<Fdstat, Error>
[src]
fn fd_fdstat_set_flags(&self, fd: Fd, flags: Fdflags) -> Result<(), Error>
[src]
fn fd_fdstat_set_rights(
&self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Result<(), Error>
[src]
&self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Result<(), Error>
fn fd_filestat_get(&self, fd: Fd) -> Result<Filestat, Error>
[src]
fn fd_filestat_set_size(&self, fd: Fd, size: Filesize) -> Result<(), Error>
[src]
fn fd_filestat_set_times(
&self,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
[src]
&self,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
fn fd_read(&self, fd: Fd, iovs: &IovecArray<'_>) -> Result<Size, Error>
[src]
fn fd_pread(
&self,
fd: Fd,
iovs: &IovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
[src]
&self,
fd: Fd,
iovs: &IovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
fn fd_write(&self, fd: Fd, ciovs: &CiovecArray<'_>) -> Result<Size, Error>
[src]
fn fd_pwrite(
&self,
fd: Fd,
ciovs: &CiovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
[src]
&self,
fd: Fd,
ciovs: &CiovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
fn fd_prestat_get(&self, fd: Fd) -> Result<Prestat, Error>
[src]
fn fd_prestat_dir_name(
&self,
fd: Fd,
path: &GuestPtr<'_, u8>,
path_max_len: Size
) -> Result<(), Error>
[src]
&self,
fd: Fd,
path: &GuestPtr<'_, u8>,
path_max_len: Size
) -> Result<(), Error>
fn fd_renumber(&self, from: Fd, to: Fd) -> Result<(), Error>
[src]
fn fd_seek(
&self,
fd: Fd,
offset: Filedelta,
whence: Whence
) -> Result<Filesize, Error>
[src]
&self,
fd: Fd,
offset: Filedelta,
whence: Whence
) -> Result<Filesize, Error>
fn fd_sync(&self, fd: Fd) -> Result<(), Error>
[src]
fn fd_tell(&self, fd: Fd) -> Result<Filesize, Error>
[src]
fn fd_readdir(
&self,
fd: Fd,
buf: &GuestPtr<'_, u8>,
buf_len: Size,
cookie: Dircookie
) -> Result<Size, Error>
[src]
&self,
fd: Fd,
buf: &GuestPtr<'_, u8>,
buf_len: Size,
cookie: Dircookie
) -> Result<Size, Error>
fn path_create_directory(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_filestat_get(
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>
) -> Result<Filestat, Error>
[src]
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>
) -> Result<Filestat, Error>
fn path_filestat_set_times(
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
fn path_link(
&self,
src_fd: Fd,
src_flags: Lookupflags,
src_path: &GuestPtr<'_, str>,
target_fd: Fd,
target_path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
src_fd: Fd,
src_flags: Lookupflags,
src_path: &GuestPtr<'_, str>,
target_fd: Fd,
target_path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_open(
&self,
dirfd: Fd,
dirflags: Lookupflags,
path: &GuestPtr<'_, str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags
) -> Result<Fd, Error>
[src]
&self,
dirfd: Fd,
dirflags: Lookupflags,
path: &GuestPtr<'_, str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags
) -> Result<Fd, Error>
fn path_readlink(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>,
buf: &GuestPtr<'_, u8>,
buf_len: Size
) -> Result<Size, Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>,
buf: &GuestPtr<'_, u8>,
buf_len: Size
) -> Result<Size, Error>
fn path_remove_directory(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_rename(
&self,
src_fd: Fd,
src_path: &GuestPtr<'_, str>,
dest_fd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
src_fd: Fd,
src_path: &GuestPtr<'_, str>,
dest_fd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_symlink(
&self,
src_path: &GuestPtr<'_, str>,
dirfd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
src_path: &GuestPtr<'_, str>,
dirfd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_unlink_file(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn poll_oneoff(
&self,
subs: &GuestPtr<'_, Subscription>,
events: &GuestPtr<'_, Event>,
nsubscriptions: Size
) -> Result<Size, Error>
[src]
&self,
subs: &GuestPtr<'_, Subscription>,
events: &GuestPtr<'_, Event>,
nsubscriptions: Size
) -> Result<Size, Error>
fn proc_exit(&self, status: Exitcode) -> Trap
[src]
fn proc_raise(&self, _sig: Signal) -> Result<(), Error>
[src]
fn sched_yield(&self) -> Result<(), Error>
[src]
fn random_get(&self, buf: &GuestPtr<'_, u8>, buf_len: Size) -> Result<(), Error>
[src]
fn sock_recv(
&self,
_fd: Fd,
_ri_data: &IovecArray<'_>,
_ri_flags: Riflags
) -> Result<(Size, Roflags), Error>
[src]
&self,
_fd: Fd,
_ri_data: &IovecArray<'_>,
_ri_flags: Riflags
) -> Result<(Size, Roflags), Error>
fn sock_send(
&self,
_fd: Fd,
_si_data: &CiovecArray<'_>,
_si_flags: Siflags
) -> Result<Size, Error>
[src]
&self,
_fd: Fd,
_si_data: &CiovecArray<'_>,
_si_flags: Siflags
) -> Result<Size, Error>
fn sock_shutdown(&self, _fd: Fd, _how: Sdflags) -> Result<(), Error>
[src]
impl<'a> WasiUnstable for WasiCtx
[src]
impl<'a> WasiUnstable for WasiCtx
[src]fn args_get<'b>(
&self,
argv: &GuestPtr<'b, GuestPtr<'b, u8>>,
argv_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
[src]
&self,
argv: &GuestPtr<'b, GuestPtr<'b, u8>>,
argv_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
fn args_sizes_get(&self) -> Result<(Size, Size), Error>
[src]
fn environ_get<'b>(
&self,
environ: &GuestPtr<'b, GuestPtr<'b, u8>>,
environ_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
[src]
&self,
environ: &GuestPtr<'b, GuestPtr<'b, u8>>,
environ_buf: &GuestPtr<'b, u8>
) -> Result<(), Error>
fn environ_sizes_get(&self) -> Result<(Size, Size), Error>
[src]
fn clock_res_get(&self, id: Clockid) -> Result<Timestamp, Error>
[src]
fn clock_time_get(
&self,
id: Clockid,
precision: Timestamp
) -> Result<Timestamp, Error>
[src]
&self,
id: Clockid,
precision: Timestamp
) -> Result<Timestamp, Error>
fn fd_advise(
&self,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice
) -> Result<(), Error>
[src]
&self,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice
) -> Result<(), Error>
fn fd_allocate(
&self,
fd: Fd,
offset: Filesize,
len: Filesize
) -> Result<(), Error>
[src]
&self,
fd: Fd,
offset: Filesize,
len: Filesize
) -> Result<(), Error>
fn fd_close(&self, fd: Fd) -> Result<(), Error>
[src]
fn fd_datasync(&self, fd: Fd) -> Result<(), Error>
[src]
fn fd_fdstat_get(&self, fd: Fd) -> Result<Fdstat, Error>
[src]
fn fd_fdstat_set_flags(&self, fd: Fd, flags: Fdflags) -> Result<(), Error>
[src]
fn fd_fdstat_set_rights(
&self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Result<(), Error>
[src]
&self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Result<(), Error>
fn fd_filestat_get(&self, fd: Fd) -> Result<Filestat, Error>
[src]
fn fd_filestat_set_size(&self, fd: Fd, size: Filesize) -> Result<(), Error>
[src]
fn fd_filestat_set_times(
&self,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
[src]
&self,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
fn fd_read(&self, fd: Fd, iovs: &IovecArray<'_>) -> Result<Size, Error>
[src]
fn fd_pread(
&self,
fd: Fd,
iovs: &IovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
[src]
&self,
fd: Fd,
iovs: &IovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
fn fd_write(&self, fd: Fd, ciovs: &CiovecArray<'_>) -> Result<Size, Error>
[src]
fn fd_pwrite(
&self,
fd: Fd,
ciovs: &CiovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
[src]
&self,
fd: Fd,
ciovs: &CiovecArray<'_>,
offset: Filesize
) -> Result<Size, Error>
fn fd_prestat_get(&self, fd: Fd) -> Result<Prestat, Error>
[src]
fn fd_prestat_dir_name(
&self,
fd: Fd,
path: &GuestPtr<'_, u8>,
path_max_len: Size
) -> Result<(), Error>
[src]
&self,
fd: Fd,
path: &GuestPtr<'_, u8>,
path_max_len: Size
) -> Result<(), Error>
fn fd_renumber(&self, from: Fd, to: Fd) -> Result<(), Error>
[src]
fn fd_seek(
&self,
fd: Fd,
offset: Filedelta,
whence: Whence
) -> Result<Filesize, Error>
[src]
&self,
fd: Fd,
offset: Filedelta,
whence: Whence
) -> Result<Filesize, Error>
fn fd_sync(&self, fd: Fd) -> Result<(), Error>
[src]
fn fd_tell(&self, fd: Fd) -> Result<Filesize, Error>
[src]
fn fd_readdir(
&self,
fd: Fd,
buf: &GuestPtr<'_, u8>,
buf_len: Size,
cookie: Dircookie
) -> Result<Size, Error>
[src]
&self,
fd: Fd,
buf: &GuestPtr<'_, u8>,
buf_len: Size,
cookie: Dircookie
) -> Result<Size, Error>
fn path_create_directory(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_filestat_get(
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>
) -> Result<Filestat, Error>
[src]
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>
) -> Result<Filestat, Error>
fn path_filestat_set_times(
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<'_, str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<(), Error>
fn path_link(
&self,
src_fd: Fd,
src_flags: Lookupflags,
src_path: &GuestPtr<'_, str>,
target_fd: Fd,
target_path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
src_fd: Fd,
src_flags: Lookupflags,
src_path: &GuestPtr<'_, str>,
target_fd: Fd,
target_path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_open(
&self,
dirfd: Fd,
dirflags: Lookupflags,
path: &GuestPtr<'_, str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags
) -> Result<Fd, Error>
[src]
&self,
dirfd: Fd,
dirflags: Lookupflags,
path: &GuestPtr<'_, str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags
) -> Result<Fd, Error>
fn path_readlink(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>,
buf: &GuestPtr<'_, u8>,
buf_len: Size
) -> Result<Size, Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>,
buf: &GuestPtr<'_, u8>,
buf_len: Size
) -> Result<Size, Error>
fn path_remove_directory(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_rename(
&self,
src_fd: Fd,
src_path: &GuestPtr<'_, str>,
dest_fd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
src_fd: Fd,
src_path: &GuestPtr<'_, str>,
dest_fd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_symlink(
&self,
src_path: &GuestPtr<'_, str>,
dirfd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
src_path: &GuestPtr<'_, str>,
dirfd: Fd,
dest_path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn path_unlink_file(
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<'_, str>
) -> Result<(), Error>
fn poll_oneoff(
&self,
subs: &GuestPtr<'_, Subscription>,
events: &GuestPtr<'_, Event>,
nsubscriptions: Size
) -> Result<Size, Error>
[src]
&self,
subs: &GuestPtr<'_, Subscription>,
events: &GuestPtr<'_, Event>,
nsubscriptions: Size
) -> Result<Size, Error>
fn proc_exit(&self, status: Exitcode) -> Trap
[src]
fn proc_raise(&self, _sig: Signal) -> Result<(), Error>
[src]
fn sched_yield(&self) -> Result<(), Error>
[src]
fn random_get(&self, buf: &GuestPtr<'_, u8>, buf_len: Size) -> Result<(), Error>
[src]
fn sock_recv(
&self,
_fd: Fd,
_ri_data: &IovecArray<'_>,
_ri_flags: Riflags
) -> Result<(Size, Roflags), Error>
[src]
&self,
_fd: Fd,
_ri_data: &IovecArray<'_>,
_ri_flags: Riflags
) -> Result<(Size, Roflags), Error>
fn sock_send(
&self,
_fd: Fd,
_si_data: &CiovecArray<'_>,
_si_flags: Siflags
) -> Result<Size, Error>
[src]
&self,
_fd: Fd,
_si_data: &CiovecArray<'_>,
_si_flags: Siflags
) -> Result<Size, Error>
fn sock_shutdown(&self, _fd: Fd, _how: Sdflags) -> Result<(), Error>
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,