pub struct Worktree<'repo> { /* private fields */ }
Expand description

A worktree checkout containing the files of the repository in consumable form.

Implementations

Configure a file-system cache checking if files below the repository are excluded.

This takes into consideration all the usual repository configuration.

Access

Read the location of the checkout, the base of the work tree

Return true if this worktree is the main worktree associated with a non-bare git repository.

It cannot be removed.

Return true if this worktree cannot be pruned, moved or deleted, which is useful if it is located on an external storage device.

Always false for the main worktree.

Provide a reason for the locking of this worktree, if it is locked at all.

Note that we squelch errors in case the file cannot be read in which case the reason is an empty string.

Return the ID of the repository worktree, if it is a linked worktree, or None if it’s a linked worktree.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.