Trait cargo_test_support::paths::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);

    // 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),

Provided Methods§

Object Safety§

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§

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),

Implementors§