[−][src]Struct wasi_common::WasiCtx
Methods
impl WasiCtx
[src]
pub fn new<S: AsRef<[u8]>>(
args: impl IntoIterator<Item = S>
) -> Result<Self, WasiCtxBuilderError>
[src]
args: impl IntoIterator<Item = S>
) -> Result<Self, WasiCtxBuilderError>
Make a new WasiCtx
with some default settings.
-
File descriptors 0, 1, and 2 inherit stdin, stdout, and stderr from the host process.
-
Environment variables are inherited from the host process.
To override these behaviors, use WasiCtxBuilder
.
Trait Implementations
impl Debug 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<()>
[src]
&self,
argv: &GuestPtr<'b, GuestPtr<'b, u8>>,
argv_buf: &GuestPtr<'b, u8>
) -> Result<()>
fn args_sizes_get(&self) -> Result<(Size, Size)>
[src]
fn environ_get<'b>(
&self,
environ: &GuestPtr<'b, GuestPtr<'b, u8>>,
environ_buf: &GuestPtr<'b, u8>
) -> Result<()>
[src]
&self,
environ: &GuestPtr<'b, GuestPtr<'b, u8>>,
environ_buf: &GuestPtr<'b, u8>
) -> Result<()>
fn environ_sizes_get(&self) -> Result<(Size, Size)>
[src]
fn clock_res_get(&self, id: Clockid) -> Result<Timestamp>
[src]
fn clock_time_get(&self, id: Clockid, precision: Timestamp) -> Result<Timestamp>
[src]
fn fd_advise(
&self,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice
) -> Result<()>
[src]
&self,
fd: Fd,
offset: Filesize,
len: Filesize,
advice: Advice
) -> Result<()>
fn fd_allocate(&self, fd: Fd, offset: Filesize, len: Filesize) -> Result<()>
[src]
fn fd_close(&self, fd: Fd) -> Result<()>
[src]
fn fd_datasync(&self, fd: Fd) -> Result<()>
[src]
fn fd_fdstat_get(&self, fd: Fd) -> Result<Fdstat>
[src]
fn fd_fdstat_set_flags(&self, fd: Fd, flags: Fdflags) -> Result<()>
[src]
fn fd_fdstat_set_rights(
&self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Result<()>
[src]
&self,
fd: Fd,
fs_rights_base: Rights,
fs_rights_inheriting: Rights
) -> Result<()>
fn fd_filestat_get(&self, fd: Fd) -> Result<Filestat>
[src]
fn fd_filestat_set_size(&self, fd: Fd, size: Filesize) -> Result<()>
[src]
fn fd_filestat_set_times(
&self,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<()>
[src]
&self,
fd: Fd,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<()>
fn fd_pread(&self, fd: Fd, iovs: &IovecArray, offset: Filesize) -> Result<Size>
[src]
fn fd_prestat_get(&self, fd: Fd) -> Result<Prestat>
[src]
fn fd_prestat_dir_name(
&self,
fd: Fd,
path: &GuestPtr<u8>,
path_len: Size
) -> Result<()>
[src]
&self,
fd: Fd,
path: &GuestPtr<u8>,
path_len: Size
) -> Result<()>
fn fd_pwrite(
&self,
fd: Fd,
ciovs: &CiovecArray,
offset: Filesize
) -> Result<Size>
[src]
&self,
fd: Fd,
ciovs: &CiovecArray,
offset: Filesize
) -> Result<Size>
fn fd_read(&self, fd: Fd, iovs: &IovecArray) -> Result<Size>
[src]
fn fd_readdir(
&self,
fd: Fd,
buf: &GuestPtr<u8>,
buf_len: Size,
cookie: Dircookie
) -> Result<Size>
[src]
&self,
fd: Fd,
buf: &GuestPtr<u8>,
buf_len: Size,
cookie: Dircookie
) -> Result<Size>
fn fd_renumber(&self, from: Fd, to: Fd) -> Result<()>
[src]
fn fd_seek(&self, fd: Fd, offset: Filedelta, whence: Whence) -> Result<Filesize>
[src]
fn fd_sync(&self, fd: Fd) -> Result<()>
[src]
fn fd_tell(&self, fd: Fd) -> Result<Filesize>
[src]
fn fd_write(&self, fd: Fd, ciovs: &CiovecArray) -> Result<Size>
[src]
fn path_create_directory(&self, dirfd: Fd, path: &GuestPtr<str>) -> Result<()>
[src]
fn path_filestat_get(
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<str>
) -> Result<Filestat>
[src]
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<str>
) -> Result<Filestat>
fn path_filestat_set_times(
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<()>
[src]
&self,
dirfd: Fd,
flags: Lookupflags,
path: &GuestPtr<str>,
atim: Timestamp,
mtim: Timestamp,
fst_flags: Fstflags
) -> Result<()>
fn path_link(
&self,
old_fd: Fd,
old_flags: Lookupflags,
old_path: &GuestPtr<str>,
new_fd: Fd,
new_path: &GuestPtr<str>
) -> Result<()>
[src]
&self,
old_fd: Fd,
old_flags: Lookupflags,
old_path: &GuestPtr<str>,
new_fd: Fd,
new_path: &GuestPtr<str>
) -> Result<()>
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>
[src]
&self,
dirfd: Fd,
dirflags: Lookupflags,
path: &GuestPtr<str>,
oflags: Oflags,
fs_rights_base: Rights,
fs_rights_inheriting: Rights,
fdflags: Fdflags
) -> Result<Fd>
fn path_readlink(
&self,
dirfd: Fd,
path: &GuestPtr<str>,
buf: &GuestPtr<u8>,
buf_len: Size
) -> Result<Size>
[src]
&self,
dirfd: Fd,
path: &GuestPtr<str>,
buf: &GuestPtr<u8>,
buf_len: Size
) -> Result<Size>
fn path_remove_directory(&self, dirfd: Fd, path: &GuestPtr<str>) -> Result<()>
[src]
fn path_rename(
&self,
old_fd: Fd,
old_path: &GuestPtr<str>,
new_fd: Fd,
new_path: &GuestPtr<str>
) -> Result<()>
[src]
&self,
old_fd: Fd,
old_path: &GuestPtr<str>,
new_fd: Fd,
new_path: &GuestPtr<str>
) -> Result<()>
fn path_symlink(
&self,
old_path: &GuestPtr<str>,
dirfd: Fd,
new_path: &GuestPtr<str>
) -> Result<()>
[src]
&self,
old_path: &GuestPtr<str>,
dirfd: Fd,
new_path: &GuestPtr<str>
) -> Result<()>
fn path_unlink_file(&self, dirfd: Fd, path: &GuestPtr<str>) -> Result<()>
[src]
fn poll_oneoff(
&self,
in_: &GuestPtr<Subscription>,
out: &GuestPtr<Event>,
nsubscriptions: Size
) -> Result<Size>
[src]
&self,
in_: &GuestPtr<Subscription>,
out: &GuestPtr<Event>,
nsubscriptions: Size
) -> Result<Size>
fn proc_exit(&self, rval: Exitcode) -> Result<(), ()>
[src]
fn proc_raise(&self, _sig: Signal) -> Result<()>
[src]
fn sched_yield(&self) -> Result<()>
[src]
fn random_get(&self, buf: &GuestPtr<u8>, buf_len: Size) -> Result<()>
[src]
fn sock_recv(
&self,
_fd: Fd,
_ri_data: &IovecArray,
_ri_flags: Riflags
) -> Result<(Size, Roflags)>
[src]
&self,
_fd: Fd,
_ri_data: &IovecArray,
_ri_flags: Riflags
) -> Result<(Size, Roflags)>
fn sock_send(
&self,
_fd: Fd,
_si_data: &CiovecArray,
_si_flags: Siflags
) -> Result<Size>
[src]
&self,
_fd: Fd,
_si_data: &CiovecArray,
_si_flags: Siflags
) -> Result<Size>
fn sock_shutdown(&self, _fd: Fd, _how: Sdflags) -> Result<()>
[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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointee for T
[src]
type Pointer = u32
fn debug(
pointer: <T as Pointee>::Pointer,
f: &mut Formatter
) -> Result<(), Error>
[src]
pointer: <T as Pointee>::Pointer,
f: &mut Formatter
) -> Result<(), Error>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,