async_wasi::snapshots::env

Struct VFS

Source
pub struct VFS { /* private fields */ }

Implementations§

Source§

impl VFS

Source

pub fn new_with_stdio<IN, OUT, ERR>(stdio_sys: StdioSys<IN, OUT, ERR>) -> Self
where IN: Read + Send + Sync + 'static, OUT: Write + Send + Sync + 'static, ERR: Write + Send + Sync + 'static,

Source

pub fn new() -> Self

Source

pub fn mount_file_sys( &mut self, path: &str, file_sys: Box<dyn WasiFileSys<Index = usize> + Send + Sync>, )

Source§

impl VFS

Source

pub fn path_open( &mut self, dirfd: usize, path: &str, oflags: OFlags, fs_rights_base: WASIRights, fs_rights_inheriting: WASIRights, fdflags: FdFlags, ) -> Result<usize, Errno>

Source

pub fn path_rename( &mut self, old_dir_fd: usize, old_path: &str, new_dir_fd: usize, new_path: &str, ) -> Result<(), Errno>

Source

pub fn fd_preopen_get(&mut self, fd: usize) -> Result<String, Errno>

Source

pub fn fd_renumber(&mut self, _from: usize, _to: usize) -> Result<(), Errno>

Source

pub fn fd_advise( &mut self, _fd: usize, _offset: __wasi_filesize_t, _len: __wasi_filesize_t, _advice: Type, ) -> Result<(), Errno>

Source

pub fn fd_close(&mut self, fd: usize) -> Result<(), Errno>

Source

pub fn path_filestat_get( &self, dir_fd: usize, path: &str, follow_symlinks: bool, ) -> Result<(u64, Filestat), Errno>

Source

pub fn path_create_directory( &mut self, dir_fd: usize, path: &str, ) -> Result<(), Errno>

Source

pub fn path_remove_directory( &mut self, dir_fd: usize, path: &str, ) -> Result<(), Errno>

Source

pub fn get_mut_inode(&mut self, fd: usize) -> Result<&mut dyn WasiNode, Errno>

Source

pub fn get_inode(&self, fd: usize) -> Result<&dyn WasiNode, Errno>

Source

pub fn get_mut_file(&mut self, fd: usize) -> Result<&mut dyn WasiFile, Errno>

Source

pub fn get_file(&self, fd: usize) -> Result<&dyn WasiFile, Errno>

Source

pub fn get_mut_dir(&mut self, fd: usize) -> Result<&mut dyn WasiDir, Errno>

Source

pub fn get_dir(&self, fd: usize) -> Result<&dyn WasiDir, Errno>

Source

pub fn get_mut_socket( &mut self, fd: usize, ) -> Result<&mut AsyncWasiSocket, Errno>

Source

pub fn get_socket(&self, fd: usize) -> Result<&AsyncWasiSocket, Errno>

Source

pub fn insert_socket(&mut self, s: AsyncWasiSocket) -> Result<usize, Errno>

Trait Implementations§

Source§

impl Debug for VFS

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for VFS

§

impl !RefUnwindSafe for VFS

§

impl Send for VFS

§

impl Sync for VFS

§

impl Unpin for VFS

§

impl !UnwindSafe for VFS

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, 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, 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.