pub struct FileChange {
pub path: String,
pub kind: DiffKind,
}Expand description
A single file change with path and kind.
Fields§
§path: StringPath to the file (relative to repository root).
kind: DiffKindKind of change.
Implementations§
Source§impl FileChange
impl FileChange
Sourcepub fn into_tuple(self) -> (String, DiffKind)
pub fn into_tuple(self) -> (String, DiffKind)
Convert to tuple representation.
Sourcepub fn from_tuple((path, kind): (String, DiffKind)) -> Self
pub fn from_tuple((path, kind): (String, DiffKind)) -> Self
Convert from tuple representation.
Trait Implementations§
Source§impl Clone for FileChange
impl Clone for FileChange
Source§fn clone(&self) -> FileChange
fn clone(&self) -> FileChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileChange
impl Debug for FileChange
impl Eq for FileChange
Source§impl Extend<FileChange> for FileChangeSet
impl Extend<FileChange> for FileChangeSet
Source§fn extend<T: IntoIterator<Item = FileChange>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = FileChange>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl From<FileChange> for (String, DiffKind)
impl From<FileChange> for (String, DiffKind)
Source§fn from(change: FileChange) -> Self
fn from(change: FileChange) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FileChange
impl PartialEq for FileChange
Source§fn eq(&self, other: &FileChange) -> bool
fn eq(&self, other: &FileChange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FileChange
Auto Trait Implementations§
impl Freeze for FileChange
impl RefUnwindSafe for FileChange
impl Send for FileChange
impl Sync for FileChange
impl Unpin for FileChange
impl UnsafeUnpin for FileChange
impl UnwindSafe for FileChange
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