#[non_exhaustive]pub enum RepoKind {
Main,
LinkedWorktree {
name: String,
},
Bare,
Submodule,
}Expand description
Which flavor of repository gix::discover found.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Main
A regular checkout with a .git/ directory.
LinkedWorktree
A linked worktree (.git is a file with gitdir: ...). name
is the per-worktree directory basename (.git/worktrees/<name>/).
Bare
A bare repository. git_branch hides on this kind (no working
tree means no dirty state).
Submodule
A submodule checkout. Has a working tree and HEAD like
Main, but carried as a distinct variant so segments that
want to style submodules differently don’t re-classify.
Trait Implementations§
impl Eq for RepoKind
impl StructuralPartialEq for RepoKind
Auto Trait Implementations§
impl Freeze for RepoKind
impl RefUnwindSafe for RepoKind
impl Send for RepoKind
impl Sync for RepoKind
impl Unpin for RepoKind
impl UnsafeUnpin for RepoKind
impl UnwindSafe for RepoKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.