pub struct ChildPath { /* private fields */ }
Expand description

A path within a TempDir

See Trait Implementations.

Examples

use assert_fs::prelude::*;

let temp = assert_fs::TempDir::new().unwrap();

let input_file = temp.child("foo.txt");
input_file.touch().unwrap();

temp.child("bar.txt").touch().unwrap();

temp.close().unwrap();

Implementations§

Wrap a path for use with extension traits.

See trait implementations or PathChild for more details.

Access the path.

Trait Implementations§

Create an empty file at ChildPath. Read more
Write a binary file at ChildPath. Read more
Write a text file at ChildPath. Read more
Assert the state of files within TempDir. Read more
Copy files and directories into the current path from the source according to the glob patterns. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.