Struct todo_file::testutil::TodoFileTestContext
source · pub struct TodoFileTestContext { /* private fields */ }
Expand description
Context for with_todo_file
Implementations§
source§impl TodoFileTestContext
impl TodoFileTestContext
sourcepub fn todo_file_mut(&mut self) -> &mut TodoFile
pub fn todo_file_mut(&mut self) -> &mut TodoFile
Get the todo file instance as mutable
sourcepub fn to_owned(self) -> (NamedTempFile, TodoFile)
pub fn to_owned(self) -> (NamedTempFile, TodoFile)
Get the todo file instance
sourcepub fn delete_file(&self)
pub fn delete_file(&self)
sourcepub fn set_file_readonly(&self)
pub fn set_file_readonly(&self)
Set the path behind ot todo file as readonly
Panics
Will panic if the file permissions cannot be changed for any reason
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TodoFileTestContext
impl Send for TodoFileTestContext
impl !Sync for TodoFileTestContext
impl Unpin for TodoFileTestContext
impl UnwindSafe for TodoFileTestContext
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