Struct run_make_support::diff::Diff
source · pub struct Diff {
expected: Option<String>,
expected_name: Option<String>,
expected_file: Option<PathBuf>,
actual: Option<String>,
actual_name: Option<String>,
normalizers: Vec<(String, String)>,
drop_bomb: DropBomb,
}Fields§
§expected: Option<String>§expected_name: Option<String>§expected_file: Option<PathBuf>§actual: Option<String>§actual_name: Option<String>§normalizers: Vec<(String, String)>§drop_bomb: DropBombImplementations§
source§impl Diff
impl Diff
sourcepub fn expected_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
pub fn expected_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
Specify the expected output for the diff from a file.
sourcepub fn expected_text<T: AsRef<[u8]>>(
&mut self,
name: &str,
text: T,
) -> &mut Self
pub fn expected_text<T: AsRef<[u8]>>( &mut self, name: &str, text: T, ) -> &mut Self
Specify the expected output for the diff from a given text string.
sourcepub fn actual_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
pub fn actual_file<P: AsRef<Path>>(&mut self, path: P) -> &mut Self
Specify the actual output for the diff from a file.
sourcepub fn actual_text<T: AsRef<[u8]>>(&mut self, name: &str, text: T) -> &mut Self
pub fn actual_text<T: AsRef<[u8]>>(&mut self, name: &str, text: T) -> &mut Self
Specify the actual output for the diff from a given text string.
sourcepub fn normalize<R: Into<String>, I: Into<String>>(
&mut self,
regex: R,
replacement: I,
) -> &mut Self
pub fn normalize<R: Into<String>, I: Into<String>>( &mut self, regex: R, replacement: I, ) -> &mut Self
Specify a regex that should replace text in the “actual” text that will be compared.
fn run_common(&self) -> (&str, &str, String, String)
pub fn run(&mut self)
pub fn run_fail(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Diff
impl RefUnwindSafe for Diff
impl Send for Diff
impl Sync for Diff
impl Unpin for Diff
impl UnwindSafe for Diff
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 176 bytes