pub struct FsFixture { /* private fields */ }Implementations§
Source§impl FsFixture
impl FsFixture
Sourcepub fn path_join(&self, path: &str) -> PathBuf
pub fn path_join(&self, path: &str) -> PathBuf
Returns the path to a file in the fixture directory
Sourcepub fn write_file(&self, path: &str, content: &str) -> Result<()>
pub fn write_file(&self, path: &str, content: &str) -> Result<()>
Writes to a file in the fixture directory
§Errors
This function will return an error if the file could not be written.
Sourcepub fn read_file(&self, path: &str) -> Result<String>
pub fn read_file(&self, path: &str) -> Result<String>
Reads a file from the fixture directory
§Errors
This function will return an error if the file could not be read.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FsFixture
impl RefUnwindSafe for FsFixture
impl Send for FsFixture
impl Sync for FsFixture
impl Unpin for FsFixture
impl UnsafeUnpin for FsFixture
impl UnwindSafe for FsFixture
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