Struct VFS

Source
pub struct VFS;

Trait Implementations§

Source§

impl Debug for VFS

Source§

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

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

impl VFS for VFS

Source§

type Ctx<'vfs> = PathBuf

Can be thought of as essentially a PathBuf, but in practice forms a trie.
Source§

type Err = Error

Result type which is either io::Error or wraps it.
Source§

type PathRef<'s> = &'s Path

Convertible from a null-terminated C string, especially MeasuredNullTermStr.
Source§

type OwnedPath = PathBuf

Convertible from an owned null-terminated C string, especially NullTermString.
Source§

type Stat = Stat

Convertible from e.g. [libc::stat64]. Read more
Source§

type File = File

Convertible from e.g. fs::File.
Source§

type FileOptions = OpenOptions

Typically just fs::OpenOptions.
Source§

type Dir<'vfs> = DirectoryStream

An open directory stream, like the result of fs::read_dir().
Source§

fn path_ref<'s>(p: &'s Self::OwnedPath) -> Self::PathRef<'s>

Source§

fn initial_context<'vfs>(&'vfs self) -> Result<Self::Ctx<'vfs>, Self::Err>

This will return a context representing the process’s current working directory.
Source§

fn join_context_dir<'vfs>( &'vfs self, ctx: Self::Ctx<'vfs>, rel: Self::PathRef<'_>, ) -> Self::Ctx<'vfs>

Source§

fn entry_rel<'vfs, 'dir, 's>( name: <<<Self as VFS>::Dir<'vfs> as DirectoryStream>::DirEntry<'dir> as DirectoryEntry>::PathRef<'s>, ) -> Self::PathRef<'s>

Source§

fn entry_owned_rel<'vfs, 'dir>( name: <<<Self as VFS>::Dir<'vfs> as DirectoryStream>::DirEntry<'dir> as DirectoryEntry>::OwnedPath, ) -> Self::OwnedPath

Source§

fn stat<'vfs>( &'vfs self, ctx: Self::Ctx<'vfs>, rel: Self::PathRef<'_>, ) -> Result<Self::Stat, Self::Err>

Read metadata from a file path and/or directory entry.
Read the contents of a symbolic link.
Source§

fn open_file<'vfs>( &'vfs self, ctx: Self::Ctx<'vfs>, rel: Self::PathRef<'_>, opts: Self::FileOptions, ) -> Result<Self::File, Self::Err>

Open a file handle. Read more
Source§

fn open_dir<'vfs>( &'vfs self, ctx: Self::Ctx<'vfs>, rel: Self::PathRef<'_>, ) -> Result<Self::Dir<'vfs>, Self::Err>

Open a directory stream.

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.