async_wasi::snapshots::common::vfs::virtual_sys

Struct WasiVirtualSys

Source
pub struct WasiVirtualSys<D: WasiVirtualDir, F: WasiVirtualFile> { /* private fields */ }

Implementations§

Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiVirtualSys<D, F>

Source

pub fn new() -> Self

Source

pub fn create_file<P: AsRef<Path>>( &mut self, dir_ino: usize, path: &P, new_file: F, ) -> Result<usize, Errno>

Source

pub fn find_inode_index<P: AsRef<Path>>( &self, dir_ino: usize, path: &P, ) -> Result<usize, Errno>

Source

pub fn create_file_inode<P: AsRef<Path>>( &mut self, dir_ino: usize, path: &P, ) -> Result<usize, Errno>

Source

pub fn create_dir_inode<P: AsRef<Path>>( &mut self, dir_ino: usize, path: &P, ) -> Result<usize, Errno>

Trait Implementations§

Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> Default for WasiVirtualSys<D, F>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<D: WasiVirtualDir, F: WasiVirtualFile> WasiFileSys for WasiVirtualSys<D, F>

Source§

type Index = usize

Source§

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

Source§

fn path_rename( &mut self, old_dir: usize, old_path: &str, new_dir: usize, new_path: &str, ) -> Result<(), Errno>

Source§

fn path_create_directory( &mut self, dir_ino: Self::Index, path: &str, ) -> Result<(), Errno>

Source§

fn fclose(&mut self, ino: Self::Index) -> Result<(), Errno>

Source§

fn path_remove_directory( &mut self, dir_ino: Self::Index, path: &str, ) -> Result<(), Errno>

Source§

fn path_filestat_get( &self, dir_ino: Self::Index, path: &str, follow_symlinks: bool, ) -> Result<Filestat, Errno>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Auto Trait Implementations§

§

impl<D, F> Freeze for WasiVirtualSys<D, F>

§

impl<D, F> RefUnwindSafe for WasiVirtualSys<D, F>

§

impl<D, F> Send for WasiVirtualSys<D, F>
where D: Send, F: Send,

§

impl<D, F> Sync for WasiVirtualSys<D, F>
where D: Sync, F: Sync,

§

impl<D, F> Unpin for WasiVirtualSys<D, F>
where D: Unpin, F: Unpin,

§

impl<D, F> UnwindSafe for WasiVirtualSys<D, F>
where D: UnwindSafe, F: UnwindSafe,

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.