async_wasi::snapshots::common::vfsTrait WasiFile
Source pub trait WasiFile: WasiNode {
// Required methods
fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>;
fn fd_pread(
&mut self,
bufs: &mut [IoSliceMut<'_>],
offset: __wasi_filesize_t,
) -> Result<usize, Errno>;
fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>;
fn fd_pwrite(
&mut self,
bufs: &[IoSlice<'_>],
offset: __wasi_filesize_t,
) -> Result<usize, Errno>;
fn fd_seek(
&mut self,
offset: __wasi_filedelta_t,
whence: Type,
) -> Result<__wasi_filesize_t, Errno>;
fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>;
// Provided methods
fn fd_advise(
&mut self,
offset: __wasi_filesize_t,
len: __wasi_filesize_t,
advice: Advice,
) -> Result<(), Errno> { ... }
fn fd_allocate(
&mut self,
offset: __wasi_filesize_t,
len: __wasi_filesize_t,
) -> Result<(), Errno> { ... }
fn fd_datasync(&mut self) -> Result<(), Errno> { ... }
fn fd_sync(&mut self) -> Result<(), Errno> { ... }
}