wasmtime_wasi::preview1

Struct WasiP1Ctx

Source
pub struct WasiP1Ctx { /* private fields */ }
Available on crate feature preview1 only.
Expand description

Structure containing state for WASIp1.

This structure is created through WasiCtxBuilder::build_p1 and is configured through the various methods of WasiCtxBuilder. This structure itself implements generated traits for WASIp1 as well as WasiView to have access to WASIp2.

Instances of WasiP1Ctx are typically stored within the T of Store<T>.

§Examples

use wasmtime::{Result, Linker};
use wasmtime_wasi::preview1::{self, WasiP1Ctx};
use wasmtime_wasi::WasiCtxBuilder;

struct MyState {
    // ... custom state as necessary ...

    wasi: WasiP1Ctx,
}

impl MyState {
    fn new() -> MyState {
        MyState {
            // .. initialize custom state if needed ..

            wasi: WasiCtxBuilder::new()
                .arg("./foo.wasm")
                // .. more customization if necesssary ..
                .build_p1(),
        }
    }
}

fn add_to_linker(linker: &mut Linker<MyState>) -> Result<()> {
    preview1::add_to_linker_sync(linker, |my_state| &mut my_state.wasi)?;
    Ok(())
}

Trait Implementations§

Source§

impl WasiSnapshotPreview1 for WasiP1Ctx

Source§

fn fd_allocate( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, _offset: Filesize, _len: Filesize, ) -> Result<(), Error>

Force the allocation of space in a file. NOTE: This is similar to posix_fallocate in POSIX.

Source§

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,

Close a file descriptor. NOTE: This is similar to close in POSIX.

Source§

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,

Synchronize the data of a file to disk. NOTE: This is similar to fdatasync in POSIX.

Source§

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,

Get the attributes of a file descriptor. NOTE: This returns similar flags to fsync(fd, F_GETFL) in POSIX, as well as additional fields.

Source§

fn fd_fdstat_set_flags( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, flags: Fdflags, ) -> Result<(), Error>

Adjust the flags associated with a file descriptor. NOTE: This is similar to fcntl(fd, F_SETFL, flags) in POSIX.

Source§

fn fd_fdstat_set_rights( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, _fs_rights_base: Rights, _fs_rights_inheriting: Rights, ) -> Result<(), Error>

Does not do anything if fd corresponds to a valid descriptor and returns [types::Errno::Badf] error otherwise.

Source§

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,

Return the attributes of an open file.

Source§

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,

Adjust the size of an open file. If this increases the file’s size, the extra bytes are filled with zeros. NOTE: This is similar to ftruncate in POSIX.

Source§

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,

Adjust the timestamps of an open file or directory. NOTE: This is similar to futimens in POSIX.

Source§

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,

Read from a file descriptor. NOTE: This is similar to readv in POSIX.

Source§

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,

Read from a file descriptor, without using and updating the file descriptor’s offset. NOTE: This is similar to preadv in POSIX.

Source§

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,

Write to a file descriptor. NOTE: This is similar to writev in POSIX.

Source§

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,

Write to a file descriptor, without using and updating the file descriptor’s offset. NOTE: This is similar to pwritev in POSIX.

Source§

fn fd_prestat_get( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Prestat, Error>

Return a description of the given preopened file descriptor.

Source§

fn fd_prestat_dir_name( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, path: GuestPtr<u8>, path_max_len: Size, ) -> Result<(), Error>

Return a description of the given preopened file descriptor.

Source§

fn fd_renumber( &mut self, _memory: &mut GuestMemory<'_>, from: Fd, to: Fd, ) -> Result<(), Error>

Atomically replace a file descriptor by renumbering another file descriptor.

Source§

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,

Move the offset of a file descriptor. NOTE: This is similar to lseek in POSIX.

Source§

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,

Synchronize the data and metadata of a file to disk. NOTE: This is similar to fsync in POSIX.

Source§

fn fd_tell( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Filesize, Error>

Return the current offset of a file descriptor. NOTE: This is similar to lseek(fd, 0, SEEK_CUR) in POSIX.

Source§

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,

Return the attributes of a file or directory. NOTE: This is similar to stat in POSIX.

Source§

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,

Adjust the timestamps of a file or directory. NOTE: This is similar to utimensat in POSIX.

Create a hard link. NOTE: This is similar to linkat in POSIX.

Source§

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,

Open a file or directory. NOTE: This is similar to openat in POSIX.

Read the contents of a symbolic link. NOTE: This is similar to readlinkat in POSIX.

Source§

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,

Rename a file or directory. NOTE: This is similar to renameat in POSIX.

Source§

fn args_get( &mut self, memory: &mut GuestMemory<'_>, argv: GuestPtr<GuestPtr<u8>>, argv_buf: GuestPtr<u8>, ) -> Result<(), Error>

Source§

fn args_sizes_get( &mut self, _memory: &mut GuestMemory<'_>, ) -> Result<(Size, Size), Error>

Source§

fn environ_get( &mut self, memory: &mut GuestMemory<'_>, environ: GuestPtr<GuestPtr<u8>>, environ_buf: GuestPtr<u8>, ) -> Result<(), Error>

Source§

fn environ_sizes_get( &mut self, _memory: &mut GuestMemory<'_>, ) -> Result<(Size, Size), Error>

Source§

fn clock_res_get( &mut self, _memory: &mut GuestMemory<'_>, id: Clockid, ) -> Result<Timestamp, Error>

Source§

fn clock_time_get( &mut self, _memory: &mut GuestMemory<'_>, id: Clockid, _precision: Timestamp, ) -> Result<Timestamp, Error>

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn proc_exit( &mut self, _memory: &mut GuestMemory<'_>, status: Exitcode, ) -> Error

Source§

fn proc_raise( &mut self, _memory: &mut GuestMemory<'_>, _sig: Signal, ) -> Result<(), Error>

Source§

fn sched_yield(&mut self, _memory: &mut GuestMemory<'_>) -> Result<(), Error>

Source§

fn random_get( &mut self, memory: &mut GuestMemory<'_>, buf: GuestPtr<u8>, buf_len: Size, ) -> Result<(), Error>

Source§

fn sock_accept( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, flags: Fdflags, ) -> Result<Fd, Error>

Source§

fn sock_recv( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, ri_data: IovecArray, ri_flags: Riflags, ) -> Result<(Size, Roflags), Error>

Source§

fn sock_send( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, si_data: CiovecArray, _si_flags: Siflags, ) -> Result<Size, Error>

Source§

fn sock_shutdown( &mut self, _memory: &mut GuestMemory<'_>, fd: Fd, how: Sdflags, ) -> Result<(), Error>

Source§

impl WasiView for WasiP1Ctx

Source§

fn table(&mut self) -> &mut ResourceTable

Yields mutable access to the internal resource management that this context contains. Read more
Source§

fn ctx(&mut self) -> &mut WasiCtx

Yields mutable access to the configuration used for this context. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

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
Source§

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
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasiUnstable for T

Source§

fn args_get( &mut self, memory: &mut GuestMemory<'_>, argv: GuestPtr<GuestPtr<u8>>, argv_buf: GuestPtr<u8>, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn args_sizes_get( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<(u32, u32), Error>

Available on crate feature preview1 only.
Source§

fn environ_get( &mut self, memory: &mut GuestMemory<'_>, environ: GuestPtr<GuestPtr<u8>>, environ_buf: GuestPtr<u8>, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn environ_sizes_get( &mut self, memory: &mut GuestMemory<'_>, ) -> Result<(u32, u32), Error>

Available on crate feature preview1 only.
Source§

fn clock_res_get( &mut self, memory: &mut GuestMemory<'_>, id: Clockid, ) -> Result<u64, Error>

Available on crate feature preview1 only.
Source§

fn clock_time_get( &mut self, memory: &mut GuestMemory<'_>, id: Clockid, precision: u64, ) -> Result<u64, Error>

Available on crate feature preview1 only.
Source§

fn fd_advise<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, offset: u64, len: u64, advice: Advice, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_allocate( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, offset: u64, len: u64, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_fdstat_set_flags( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, flags: Fdflags, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn fd_fdstat_set_rights( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, fs_rights_base: Rights, fs_rights_inheriting: Rights, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_filestat_set_size<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, size: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_filestat_set_times<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, atim: u64, mtim: u64, fst_flags: Fstflags, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_read<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, iovs: GuestPtr<[Iovec]>, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_pread<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, iovs: GuestPtr<[Iovec]>, offset: u64, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_write<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, ciovs: GuestPtr<[Ciovec]>, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_pwrite<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, ciovs: GuestPtr<[Ciovec]>, offset: u64, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_prestat_get( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<Prestat, Error>

Available on crate feature preview1 only.
Source§

fn fd_prestat_dir_name( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, path: GuestPtr<u8>, path_max_len: u32, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn fd_renumber( &mut self, memory: &mut GuestMemory<'_>, from: Fd, to: Fd, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn fd_seek<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, offset: i64, whence: Whence, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn fd_tell( &mut self, memory: &mut GuestMemory<'_>, fd: Fd, ) -> Result<u64, Error>

Available on crate feature preview1 only.
Source§

fn fd_readdir<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, fd: Fd, buf: GuestPtr<u8>, buf_len: u32, cookie: u64, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

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: u64, mtim: u64, fst_flags: Fstflags, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

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 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Available on crate feature preview1 only.
Available on crate feature preview1 only.
Source§

fn poll_oneoff<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, memory: &'life1 mut GuestMemory<'life2>, subs: GuestPtr<Subscription>, events: GuestPtr<Event>, nsubscriptions: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, T: 'async_trait,

Available on crate feature preview1 only.
Source§

fn proc_exit(&mut self, memory: &mut GuestMemory<'_>, status: u32) -> Error

Available on crate feature preview1 only.
Source§

fn proc_raise( &mut self, memory: &mut GuestMemory<'_>, sig: Signal, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn sched_yield(&mut self, memory: &mut GuestMemory<'_>) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn random_get( &mut self, memory: &mut GuestMemory<'_>, buf: GuestPtr<u8>, buf_len: u32, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

fn sock_recv( &mut self, _memory: &mut GuestMemory<'_>, _fd: Fd, _ri_data: GuestPtr<[Iovec]>, _ri_flags: Riflags, ) -> Result<(u32, Roflags), Error>

Available on crate feature preview1 only.
Source§

fn sock_send( &mut self, _memory: &mut GuestMemory<'_>, _fd: Fd, _si_data: GuestPtr<[Ciovec]>, _si_flags: u16, ) -> Result<u32, Error>

Available on crate feature preview1 only.
Source§

fn sock_shutdown( &mut self, _memory: &mut GuestMemory<'_>, _fd: Fd, _how: Sdflags, ) -> Result<(), Error>

Available on crate feature preview1 only.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T