pub struct FileChange {
pub path: String,
pub change_type: ChangeType,
pub old_blob_hash: Option<Hash>,
pub new_blob_hash: Option<Hash>,
pub old_path: Option<String>,
pub old_mode: Option<FileMode>,
pub new_mode: Option<FileMode>,
}Expand description
A file change in a commit
Fields§
§path: String§change_type: ChangeType§old_blob_hash: Option<Hash>§new_blob_hash: Option<Hash>§old_path: Option<String>For renames, the original path before renaming
old_mode: Option<FileMode>File mode before the change. None for additions, or when the
producer didn’t carry mode through (e.g. a FileChange built from a
wire payload that omits mode). Populated by Manifest::diff_with_renames.
new_mode: Option<FileMode>File mode after the change. None for deletions, or when the
producer didn’t carry mode through.
Trait Implementations§
Source§impl Clone for FileChange
impl Clone for FileChange
Source§impl Debug for FileChange
impl Debug for FileChange
Source§impl<'de> Deserialize<'de> for FileChange
impl<'de> Deserialize<'de> for FileChange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for FileChange
impl Freeze for FileChange
impl Move 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more