TempDirApiAsync

Trait TempDirApiAsync 

Source
pub trait TempDirApiAsync<'vfs> {
    type Vfs: VfsAsync + WriteSupportingVfsAsync;
    type FuturePersistAt: Future<Output = VfsResult<(), Self::Vfs>> + Send + 'vfs;
    type FutureDelete: Future<Output = VfsResult<(), Self::Vfs>> + Send + 'vfs;

    // Required methods
    fn path(&self) -> &<Self::Vfs as VfsCore>::Path;
    fn persist_at(
        self,
        vfs: Pin<&'vfs Self::Vfs>,
        path: <<Self::Vfs as VfsCore>::Path as PathType>::OwnedPath,
    ) -> Self::FuturePersistAt;
    fn delete(self, vfs: Pin<&'vfs Self::Vfs>) -> Self::FutureDelete;
}
Available on crate feature async only.
Expand description

An async version of the TempDirApi trait.

Required Associated Types§

Source

type Vfs: VfsAsync + WriteSupportingVfsAsync

The associated VFS type.

Source

type FuturePersistAt: Future<Output = VfsResult<(), Self::Vfs>> + Send + 'vfs

The future type for the persist_at method.

Source

type FutureDelete: Future<Output = VfsResult<(), Self::Vfs>> + Send + 'vfs

The future type for the delete method.

Required Methods§

Source

fn path(&self) -> &<Self::Vfs as VfsCore>::Path

Returns the path of the temporary directory.

Source

fn persist_at( self, vfs: Pin<&'vfs Self::Vfs>, path: <<Self::Vfs as VfsCore>::Path as PathType>::OwnedPath, ) -> Self::FuturePersistAt

Persists the temporary directory at the specified path in the VFS.

Source

fn delete(self, vfs: Pin<&'vfs Self::Vfs>) -> Self::FutureDelete

Deletes the temporary directory.

Implementors§