CargoPathExt

Trait CargoPathExt 

Source
pub trait CargoPathExt {
    // Required methods
    fn to_url(&self) -> Url;
    fn rm_rf(&self);
    fn mkdir_p(&self);
    fn ls_r(&self) -> Vec<PathBuf>;
    fn move_in_time<F>(&self, travel_amount: F)
       where F: Fn(i64, u32) -> (i64, u32);
    fn assert_build_dir_layout(&self, expected: impl IntoData);
    fn assert_dir_layout(
        &self,
        expected: impl IntoData,
        ignored_path_patterns: &[String],
    );

    // Provided methods
    fn move_into_the_past(&self) { ... }
    fn move_into_the_future(&self) { ... }
}
Expand description

Common path and file operations

Required Methods§

Source

fn to_url(&self) -> Url

Source

fn rm_rf(&self)

Source

fn mkdir_p(&self)

Source

fn ls_r(&self) -> Vec<PathBuf>

Returns a list of all files and directories underneath the given directory, recursively, including the starting path.

Source

fn move_in_time<F>(&self, travel_amount: F)
where F: Fn(i64, u32) -> (i64, u32),

Source

fn assert_build_dir_layout(&self, expected: impl IntoData)

Source

fn assert_dir_layout( &self, expected: impl IntoData, ignored_path_patterns: &[String], )

Provided Methods§

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.

Implementations on Foreign Types§

Source§

impl CargoPathExt for Path

Source§

fn to_url(&self) -> Url

Source§

fn rm_rf(&self)

Source§

fn mkdir_p(&self)

Source§

fn ls_r(&self) -> Vec<PathBuf>

Source§

fn move_in_time<F>(&self, travel_amount: F)
where F: Fn(i64, u32) -> (i64, u32),

Source§

fn assert_build_dir_layout(&self, expected: impl IntoData)

Source§

fn assert_dir_layout( &self, expected: impl IntoData, ignored_path_patterns: &[String], )

Source§

impl CargoPathExt for PathBuf

Source§

fn to_url(&self) -> Url

Source§

fn rm_rf(&self)

Source§

fn mkdir_p(&self)

Source§

fn ls_r(&self) -> Vec<PathBuf>

Source§

fn move_in_time<F>(&self, travel_amount: F)
where F: Fn(i64, u32) -> (i64, u32),

Source§

fn assert_build_dir_layout(&self, expected: impl IntoData)

Source§

fn assert_dir_layout( &self, expected: impl IntoData, ignored_path_patterns: &[String], )

Implementors§