pub struct Fixture {
pub paths: Vec<String>,
/* private fields */
}Fields§
§paths: Vec<String>Implementations§
Source§impl Fixture
Create directories, files, and tear them down at will.
Used throughout immutag crates for testing purposes.
See tests directories of said crates for examples.
impl Fixture
Create directories, files, and tear them down at will. Used throughout immutag crates for testing purposes. See tests directories of said crates for examples.
pub fn new() -> Fixture
pub fn add_dirpath(&mut self, path: String) -> Fixture
pub fn add_file(&mut self, file: String) -> Fixture
Sourcepub fn build(&mut self) -> Fixture
pub fn build(&mut self) -> Fixture
Builds all the directory files and paths and then writes them to disk.
Sourcepub fn teardown(&mut self, del_all: bool) -> Fixture
pub fn teardown(&mut self, del_all: bool) -> Fixture
Teardown everything. At the moment, it’s really only suited for tearing down all the files, except the .immutag dir itself. However, more fine grained control can be added within this method. For example, teardown could take a Vec of paths to delete.
Trait Implementations§
impl StructuralPartialEq for Fixture
Auto Trait Implementations§
impl Freeze for Fixture
impl RefUnwindSafe for Fixture
impl Send for Fixture
impl Sync for Fixture
impl Unpin for Fixture
impl UnsafeUnpin for Fixture
impl UnwindSafe for Fixture
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