pub struct CompactPathTree { /* private fields */ }
Expand description
A compact immutable representation of the paths within a directory.
Implementations§
Source§impl CompactPathTree
impl CompactPathTree
Sourcepub fn new(root: PathBuf, visitor: &mut impl PathVisitor) -> Result<Self>
pub fn new(root: PathBuf, visitor: &mut impl PathVisitor) -> Result<Self>
Construct a new CompactPathTree
by doing a depth-first traversal of
the given directory.
The given visitor is used to determine which items should be included and what errors are fatal.
Symbolic links will be stored in the tree, but not followed.
Sourcepub fn iter(&self) -> CompactPathTreeIter<'_> ⓘ
pub fn iter(&self) -> CompactPathTreeIter<'_> ⓘ
Get an iterator over the paths stored in this tree.
The root path isn’t included in the output of this iterator, only its contents are. The paths are iterated in a depth-first traversal of the tree, with parents being emitted before children. No other guarantees are made with regards to ordering.
Trait Implementations§
Source§impl Clone for CompactPathTree
impl Clone for CompactPathTree
Source§fn clone(&self) -> CompactPathTree
fn clone(&self) -> CompactPathTree
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> IntoIterator for &'a CompactPathTree
impl<'a> IntoIterator for &'a CompactPathTree
Source§impl PartialEq for CompactPathTree
impl PartialEq for CompactPathTree
impl Eq for CompactPathTree
impl StructuralPartialEq for CompactPathTree
Auto Trait Implementations§
impl Freeze for CompactPathTree
impl RefUnwindSafe for CompactPathTree
impl Send for CompactPathTree
impl Sync for CompactPathTree
impl Unpin for CompactPathTree
impl UnwindSafe for CompactPathTree
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