pub struct FileCmp { /* private fields */ }Expand description
A File wrapper which provides methods for doing file comparisons.
operations.
Implementations§
Source§impl FileCmp
impl FileCmp
Sourcepub fn not_found(path: PathBuf) -> Self
pub fn not_found(path: PathBuf) -> Self
Returns a file comparer which behaves like a non-existent file.
Sourcepub fn partial_cmp(
&self,
other: &Self,
diff_op: &DiffOp,
promote_newest: bool,
) -> Option<Ordering>
pub fn partial_cmp( &self, other: &Self, diff_op: &DiffOp, promote_newest: bool, ) -> Option<Ordering>
Returns an ordering between the given FileCmps based on their
modification times, if such an ordering exists.
§Parameters
other: The otherFileCmpto compare to.diff_op: TheDiffOpto compare file differences. If the files do not differ, they will compare equal regardless of their modification times.promote_newest: If true, indicates that missing files should be considered greater than other files. Otherwise, they are considered less than other files.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileCmp
impl RefUnwindSafe for FileCmp
impl Send for FileCmp
impl Sync for FileCmp
impl Unpin for FileCmp
impl UnwindSafe for FileCmp
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