gix_status::index_as_worktree_with_renames

Struct Context

source
pub struct Context<'a> {
    pub pathspec: Search,
    pub resource_cache: Platform,
    pub should_interrupt: &'a AtomicBool,
    pub dirwalk: DirwalkContext<'a>,
}
Available on crate feature worktree-rewrites only.
Expand description

Fields§

§pathspec: Search

The pathspec to limit the amount of paths that are checked. Can be empty to allow all paths.

Note that these are expected to have a common_prefix() according to the prefix of the repository to efficiently limit the scope of the paths we process, both for the index modifications as well as for the directory walk.

§resource_cache: Platform

A fully-configured platform capable of producing diffable buffers similar to what Git would do, for use with rewrite tracking.

Note that it contains resources that are additionally used here:

  • attr_stack
    • A stack pre-configured to allow accessing attributes for each entry, as required for filter and possibly pathspecs. It may also allow accessing .gitignore information for use in the directory walk. If no excludes information is present, the directory walk will identify ignored files as untracked, which might be desirable under certain circumstances.
  • filter
    • A filter to be able to perform conversions from and to the worktree format. It is needed to potentially refresh the index with data read from the worktree, which needs to be converted back to the form stored in Git.
§should_interrupt: &'a AtomicBool

A flag to query to learn if cancellation is requested.

§dirwalk: DirwalkContext<'a>

The context for the directory walk.

Auto Trait Implementations§

§

impl<'a> Freeze for Context<'a>

§

impl<'a> RefUnwindSafe for Context<'a>

§

impl<'a> Send for Context<'a>

§

impl<'a> Sync for Context<'a>

§

impl<'a> Unpin for Context<'a>

§

impl<'a> UnwindSafe for Context<'a>

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>,

source§

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>,

source§

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.