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

Struct DiskFileSys

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

Implementations§

Source§

impl DiskFileSys

Source

pub fn new(host_path: PathBuf) -> Result<Self>

Source

pub fn get_absolutize_path<P: AsRef<Path>>( &self, sub_path: &P, ) -> Result<PathBuf, Errno>

Trait Implementations§

Source§

impl WasiFileSys for DiskFileSys

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<Self::Index, 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 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 fclose(&mut self, ino: Self::Index) -> Result<(), 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§

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.