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)
Delete the path behind the todo file
§Panics
Will panic if the file cannot be deleted for any reason
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 !Freeze for TodoFileTestContext
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