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.

§

impl<T> GetSetFdFlags for T

§

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,

Create a new SetFdFlags value for use with set_fd_flags. Read more
§

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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

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

source§

impl<T> Same for T

source§

type Output = T

Should always be Self
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.
§

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

§

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