pub struct TestDir { /* private fields */ }Expand description
Lightweight temp directory builder for unit tests that just need files on disk.
use scute_test_utils::TestDir;
let t = TestDir::new()
.file("src/main.rs") // empty file
.source_file("lib.rs", "fn hello() {}"); // file with content
let root = t.root(); // path to the temp directory
let file = t.path("lib.rs"); // path to a specific fileImplementations§
Auto Trait Implementations§
impl Freeze for TestDir
impl RefUnwindSafe for TestDir
impl Send for TestDir
impl Sync for TestDir
impl Unpin for TestDir
impl UnsafeUnpin for TestDir
impl UnwindSafe for TestDir
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more