pub enum TreeDiffOperation<Path: AsRef<[LabelNameId]> = Box<[LabelNameId]>> {
Added {
path: Path,
new_file: NodeId,
new_perm: Option<Permission>,
},
Deleted {
path: Path,
old_file: NodeId,
old_perm: Option<Permission>,
},
Modified {
path: Path,
new_file: NodeId,
old_file: NodeId,
new_perm: Option<Permission>,
old_perm: Option<Permission>,
},
Moved {
old_path: Path,
new_path: Path,
old_file: NodeId,
new_file: NodeId,
old_perm: Option<Permission>,
new_perm: Option<Permission>,
},
}Expand description
An operation made between two revisions on a single directory entry
Variants§
Added
Adds a single file or directory
Deleted
Removes a single file or directory
Modified
Edits a single file (it can’t be a directory)
Fields
§
path: PathFull path (from the repo root) to the removed file
§
new_perm: Option<Permission>§
old_perm: Option<Permission>Moved
Moves a file from one place to another. The file may have been edited in the process, in which case the two supplied node ids will differ.
Implementations§
Source§impl<Path: AsRef<[LabelNameId]>> TreeDiffOperation<Path>
impl<Path: AsRef<[LabelNameId]>> TreeDiffOperation<Path>
pub fn shallow_copy(&self) -> TreeDiffOperation<&[LabelNameId]>
Trait Implementations§
Source§impl<Path: Clone + AsRef<[LabelNameId]>> Clone for TreeDiffOperation<Path>
impl<Path: Clone + AsRef<[LabelNameId]>> Clone for TreeDiffOperation<Path>
Source§fn clone(&self) -> TreeDiffOperation<Path>
fn clone(&self) -> TreeDiffOperation<Path>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Path: Debug + AsRef<[LabelNameId]>> Debug for TreeDiffOperation<Path>
impl<Path: Debug + AsRef<[LabelNameId]>> Debug for TreeDiffOperation<Path>
Source§impl<Path: PartialEq + AsRef<[LabelNameId]>> PartialEq for TreeDiffOperation<Path>
impl<Path: PartialEq + AsRef<[LabelNameId]>> PartialEq for TreeDiffOperation<Path>
impl<Path: Eq + AsRef<[LabelNameId]>> Eq for TreeDiffOperation<Path>
impl<Path: AsRef<[LabelNameId]>> StructuralPartialEq for TreeDiffOperation<Path>
Auto Trait Implementations§
impl<Path> Freeze for TreeDiffOperation<Path>where
Path: Freeze,
impl<Path> RefUnwindSafe for TreeDiffOperation<Path>where
Path: RefUnwindSafe,
impl<Path> Send for TreeDiffOperation<Path>where
Path: Send,
impl<Path> Sync for TreeDiffOperation<Path>where
Path: Sync,
impl<Path> Unpin for TreeDiffOperation<Path>where
Path: Unpin,
impl<Path> UnwindSafe for TreeDiffOperation<Path>where
Path: UnwindSafe,
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, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
impl<T, U> CastableInto<U> for Twhere
U: CastableFrom<T>,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T> DowncastableFrom<T> for T
impl<T> DowncastableFrom<T> for T
Source§fn downcast_from(value: T) -> T
fn downcast_from(value: T) -> T
Truncate the current UnsignedInt to a possibly smaller size
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
impl<T, U> DowncastableInto<U> for Twhere
U: DowncastableFrom<T>,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.
Source§impl<T> UpcastableFrom<T> for T
impl<T> UpcastableFrom<T> for T
Source§fn upcast_from(value: T) -> T
fn upcast_from(value: T) -> T
Extend the current UnsignedInt to a possibly bigger size.