pub struct FileDiff {
pub path: PathBuf,
pub old_path: Option<PathBuf>,
pub status: DiffStatus,
pub chunks: Box<[DiffChunk]>,
pub additions: usize,
pub deletions: usize,
}
Fields§
§path: PathBuf
§old_path: Option<PathBuf>
§status: DiffStatus
§chunks: Box<[DiffChunk]>
§additions: usize
§deletions: usize
Implementations§
Source§impl FileDiff
impl FileDiff
pub fn new(path: PathBuf, status: DiffStatus) -> Self
pub fn with_old_path(self, old_path: PathBuf) -> Self
pub fn with_chunks(self, chunks: Vec<DiffChunk>) -> Self
pub fn with_stats(self, additions: usize, deletions: usize) -> Self
pub fn is_binary(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileDiff
impl RefUnwindSafe for FileDiff
impl Send for FileDiff
impl Sync for FileDiff
impl Unpin for FileDiff
impl UnwindSafe for FileDiff
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