pub struct Collect {
pub unorded_entries: Vec<(Entry, Option<Status>)>,
}
Expand description
A Delegate
implementation that collects all entries
along with their directory status, if present.
Note that this allocates for each entry.
Fields§
§unorded_entries: Vec<(Entry, Option<Status>)>
All collected entries, in any order.
Implementations§
Trait Implementations§
source§impl Delegate for Collect
impl Delegate for Collect
source§fn emit(&mut self, entry: EntryRef<'_>, dir_status: Option<Status>) -> Action
fn emit(&mut self, entry: EntryRef<'_>, dir_status: Option<Status>) -> Action
Called for each observed
entry
inside a directory, or the directory itself if the traversal is configured
to simplify the result (i.e. if every file in a directory is ignored, emit the containing directory instead
of each file), or if the root of the traversal passes through a directory that can’t be traversed. Read moresource§fn can_recurse(
&mut self,
entry: EntryRef<'_>,
for_deletion: Option<ForDeletionMode>,
worktree_root_is_repository: bool
) -> bool
fn can_recurse( &mut self, entry: EntryRef<'_>, for_deletion: Option<ForDeletionMode>, worktree_root_is_repository: bool ) -> bool
Return
true
if the given entry can be recursed into. Will only be called if the entry is a physical directory.
The base implementation will act like Git does by default in git status
or git clean
. Read moreAuto Trait Implementations§
impl Freeze for Collect
impl RefUnwindSafe for Collect
impl Send for Collect
impl Sync for Collect
impl Unpin for Collect
impl UnwindSafe for Collect
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