TokioFs

Struct TokioFs 

Source
pub struct TokioFs {}
Available on crate feature tokio-rt only.
Expand description

tokio’s abstraction of a Filesystem.

Trait Implementations§

Source§

impl Clone for TokioFs

Source§

fn clone(&self) -> TokioFs

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TokioFs

Source§

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

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

impl Default for TokioFs

Source§

fn default() -> TokioFs

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

impl Filesystem for TokioFs

Source§

type ReadDir = ReadDirStream

Source§

type DirEntry = DirEntry

Source§

fn canonicalize<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<PathBuf>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Returns the canonical form of a path. Read more
Source§

fn copy<'async_trait, S, D>( from: S, to: D, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where S: 'async_trait + AsRef<Path> + Send, D: 'async_trait + AsRef<Path> + Send,

Copies the contents and permissions of a file to a new location. Read more
Source§

fn create_dir<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Creates a new directory. Read more
Source§

fn create_dir_all<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Creates a new directory and all of its parents if they are missing. Read more
Creates a hard link on the filesystem. Read more
Source§

fn metadata<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<Metadata>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Reads metadata for a path. Read more
Source§

fn read<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Reads the entire contents of a file as raw bytes. Read more
Source§

fn read_dir<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<Self::ReadDir>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send, Self: 'async_trait,

Returns a stream of entries in a directory. Read more
Reads a symbolic link and returns the path it points to. Read more
Source§

fn read_to_string<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Reads the entire contents of a file as a string. Read more
Source§

fn remove_dir<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Removes an empty directory. Read more
Source§

fn remove_dir_all<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Removes a directory and all of its contents. Read more
Source§

fn remove_file<'async_trait, P>( path: P, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Removes a file. Read more
Source§

fn rename<'async_trait, O, N>( from: O, to: N, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where O: 'async_trait + AsRef<Path> + Send, N: 'async_trait + AsRef<Path> + Send,

Renames a file or directory to a new location. Read more
Source§

fn set_permissions<'async_trait, P>( path: P, perm: Permissions, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send,

Changes the permissions of a file or directory. Read more
Reads metadata for a path without following symbolic links. Read more
Source§

fn write<'async_trait, P, C>( path: P, contents: C, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where P: 'async_trait + AsRef<Path> + Send, C: 'async_trait + AsRef<[u8]> + Send,

Writes a slice of bytes as the new contents of a file. Read more
Source§

impl Hash for TokioFs

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TokioFs

Source§

fn eq(&self, other: &TokioFs) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for TokioFs

Source§

impl Eq for TokioFs

Source§

impl StructuralPartialEq for TokioFs

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.