pub struct ExpectFile { /* private fields */ }Expand description
Self-updating file.
ExpectFile::assert_eq updates the file when the UPDATE_EXPECT environment variable is
set.
Implementations§
Source§impl ExpectFile
 
impl ExpectFile
Sourcepub fn assert_eq(&self, actual: &[u8])
 
pub fn assert_eq(&self, actual: &[u8])
Checks whether file’s contents are equal to actual.
When the UPDATE_EXPECT environment variable is set, the file is updated or created with
the data from actual.
§Panics
Will panic when the file’s contents don’t equal actual and UPDATE_EXPECT is not set or
if writing to stdout or updating the file fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExpectFile
impl RefUnwindSafe for ExpectFile
impl Send for ExpectFile
impl Sync for ExpectFile
impl Unpin for ExpectFile
impl UnwindSafe for ExpectFile
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