pub struct SnapshotResult {
pub added: Vec<PathBuf>,
pub modified: Vec<PathBuf>,
pub deleted: Vec<PathBuf>,
}Expand description
The result of a workspace snapshot operation.
Contains all changes detected in a workspace’s working copy, categorized by type (added, modified, deleted).
Fields§
§added: Vec<PathBuf>Added files (relative to workspace root).
modified: Vec<PathBuf>Modified files (relative to workspace root).
deleted: Vec<PathBuf>Deleted files (relative to workspace root).
Implementations§
Source§impl SnapshotResult
impl SnapshotResult
Sourcepub const fn new(
added: Vec<PathBuf>,
modified: Vec<PathBuf>,
deleted: Vec<PathBuf>,
) -> Self
pub const fn new( added: Vec<PathBuf>, modified: Vec<PathBuf>, deleted: Vec<PathBuf>, ) -> Self
Create a new snapshot result with the given changes.
§Arguments
added- Paths to files that were addedmodified- Paths to files that were modifieddeleted- Paths to files that were deleted
Sourcepub fn all_changed(&self) -> Vec<&PathBuf>
pub fn all_changed(&self) -> Vec<&PathBuf>
All changed files (added + modified + deleted).
Sourcepub const fn change_count(&self) -> usize
pub const fn change_count(&self) -> usize
Total count of all changes.
Trait Implementations§
Source§impl Clone for SnapshotResult
impl Clone for SnapshotResult
Source§fn clone(&self) -> SnapshotResult
fn clone(&self) -> SnapshotResult
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 Debug for SnapshotResult
impl Debug for SnapshotResult
Source§impl PartialEq for SnapshotResult
impl PartialEq for SnapshotResult
impl Eq for SnapshotResult
impl StructuralPartialEq for SnapshotResult
Auto Trait Implementations§
impl Freeze for SnapshotResult
impl RefUnwindSafe for SnapshotResult
impl Send for SnapshotResult
impl Sync for SnapshotResult
impl Unpin for SnapshotResult
impl UnsafeUnpin for SnapshotResult
impl UnwindSafe for SnapshotResult
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.