Struct gix_dir::walk::delegate::Collect

source ·
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§

source§

impl Collect

source

pub fn into_entries_by_path(self) -> Vec<(Entry, Option<Status>)>

Return the list of entries that were emitted, sorted ascending by their repository-relative tree path.

Trait Implementations§

source§

impl Default for Collect

source§

fn default() -> Collect

Returns the “default value” for a type. Read more
source§

impl Delegate for Collect

source§

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 more
source§

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 more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.