pub struct DirEntryInfo {
pub name: String,
pub path: String,
pub is_dir: bool,
pub is_git_repo: bool,
}Expand description
A single entry in a DirListing — one row of screen 7a’s picker.
Why: carries exactly the four fields 7a renders and the binding model
consumes: the label (name), the value to navigate/bind to (path),
whether it can be descended into (is_dir), and whether it draws the git
badge vs. the — placeholder (is_git_repo).
What: path is absolute and already resolved; is_git_repo is always
false for a non-directory (a file cannot be a repo).
Test: tests::lists_entries_with_names_and_paths,
tests::non_git_dir_is_reported_as_non_git.
Fields§
§name: StringThe entry’s file name — 7a’s row label (e.g. acme-api).
path: StringAbsolute path to the entry; what the client passes back to navigate into it or to bind it as the project root.
is_dir: boolWhether the entry is a directory (symlinks are followed).
is_git_repo: boolWhether the entry is a git repository — 7a’s git badge, and the
non-git → git discriminator of the three-state binding model. See
[is_git_repo] for how this is determined.
Trait Implementations§
Source§impl Clone for DirEntryInfo
impl Clone for DirEntryInfo
Source§fn clone(&self) -> DirEntryInfo
fn clone(&self) -> DirEntryInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DirEntryInfo
impl Debug for DirEntryInfo
impl Eq for DirEntryInfo
Source§impl PartialEq for DirEntryInfo
impl PartialEq for DirEntryInfo
Source§impl Serialize for DirEntryInfo
impl Serialize for DirEntryInfo
impl StructuralPartialEq for DirEntryInfo
Auto Trait Implementations§
impl Freeze for DirEntryInfo
impl RefUnwindSafe for DirEntryInfo
impl Send for DirEntryInfo
impl Sync for DirEntryInfo
impl Unpin for DirEntryInfo
impl UnsafeUnpin for DirEntryInfo
impl UnwindSafe for DirEntryInfo
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more