test_dir

Trait DirBuilder

Source
pub trait DirBuilder {
    // Required methods
    fn create(self, path: &str, filetype: FileType) -> Self;
    fn remove(self, path: &str) -> Self;
    fn path(&self, path: &str) -> PathBuf;
    fn root(&self) -> &Path;
}
Expand description

File structure builder trait

Required Methods§

Source

fn create(self, path: &str, filetype: FileType) -> Self

Create a file or directory under the path

Source

fn remove(self, path: &str) -> Self

Remove a file or directory under the path

Source

fn path(&self, path: &str) -> PathBuf

Prefix path with the current context of the DirBuilder

Source

fn root(&self) -> &Path

Return the root path to the temporary directory

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§