pub struct Tree {
pub root: PathBuf,
pub entries: Vec<Entry>,
pub hidden: bool,
}Fields§
§root: PathBuf§entries: Vec<Entry>Implementations§
Source§impl Tree
impl Tree
pub fn new(root: PathBuf, hidden: bool) -> Self
Sourcepub fn display_root(&self) -> Cow<'_, str>
pub fn display_root(&self) -> Cow<'_, str>
root, or — on the synthetic drives level — a label for it, since an
empty path would otherwise render as a blank title bar.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, i: usize) -> Option<&Entry>
pub fn reload(&mut self)
Sourcepub fn up(&mut self) -> bool
pub fn up(&mut self) -> bool
Re-root one directory up. At a drive root on Windows, steps out to the
synthetic drives level ([load]) instead of stopping, since C:\ has
no parent the way nested directories do. False once there is truly
nothing above (the drives level itself, or / on other platforms).
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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