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.