pub struct WasiPreOpenDir {
    pub guest_path: PathBuf,
    /* private fields */
}

Fields§

§guest_path: PathBuf

Implementations§

source§

impl WasiPreOpenDir

source

pub fn new(host_path: PathBuf, guest_path: PathBuf) -> Self

source

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

source

pub fn path_open_file<P: AsRef<Path>>( &mut self, path: &P, oflags: OFlags, fs_rights_base: WASIRights, fdflags: FdFlags ) -> Result<WasiFile, Errno>

source

pub fn path_open_dir<P: AsRef<Path>>( &mut self, path: &P, oflags: OFlags, fs_rights_base: WASIRights, fs_rights_inheriting: WASIRights, fdflags: FdFlags ) -> Result<WasiDir, Errno>

source

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

source

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

source

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

Methods from Deref<Target = WasiDir>§

source

pub fn fd_readdir( &self, cursor: usize, write_buf: &mut [u8] ) -> Result<usize, Errno>

source

pub fn fd_fdstat_get(&self) -> Result<FdStat, Errno>

source

pub fn fd_fdstat_set_rights( &mut self, fs_rights_base: WASIRights, fs_rights_inheriting: WASIRights ) -> Result<(), Errno>

source

pub fn fd_filestat_get(&mut self) -> Result<Filestat, Errno>

source

pub fn fd_filestat_set_times( &mut self, atim: __wasi_timestamp_t, mtim: __wasi_timestamp_t, fst_flags: Type ) -> Result<(), Errno>

Trait Implementations§

source§

impl Debug for WasiPreOpenDir

source§

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

Formats the value using the given formatter. Read more
source§

impl Deref for WasiPreOpenDir

§

type Target = WasiDir

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for WasiPreOpenDir

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.