pub struct DirEntry {
pub path: PathBuf,
pub name: String,
pub is_dir: bool,
}Expand description
One filesystem entry, in the shape both listings need.
Carries the name and the full path because the two majors want
different halves: oil’s rope is bare names (its :w diff reads
them as filenames), while the tree keys rows and icons off paths.
Computing both once here is cheaper than either caller
re-deriving the other from a read_dir result it has already
dropped.
Fields§
§path: PathBuf§name: String§is_dir: boolTrait Implementations§
impl Eq for DirEntry
impl StructuralPartialEq for DirEntry
Auto Trait Implementations§
impl Freeze for DirEntry
impl RefUnwindSafe for DirEntry
impl Send for DirEntry
impl Sync for DirEntry
impl Unpin for DirEntry
impl UnsafeUnpin for DirEntry
impl UnwindSafe for DirEntry
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.