[][src]Struct compact_path_tree::CompactPathTree

pub struct CompactPathTree { /* fields omitted */ }

A compact immutable representation of the paths within a directory.

Implementations

impl CompactPathTree[src]

pub fn new(root: PathBuf, visitor: &mut impl PathVisitor) -> Result<Self>[src]

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.

pub fn inner(&self) -> &Path[src]

Get the underlying path this tree is represented as.

pub fn root(&self) -> &Path[src]

Get the root path this tree was constructed from.

pub fn iter(&self) -> CompactPathTreeIter[src]

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

impl Clone for CompactPathTree[src]

impl Eq for CompactPathTree[src]

impl<'a> IntoIterator for &'a CompactPathTree[src]

type Item = PathBuf

The type of the elements being iterated over.

type IntoIter = CompactPathTreeIter<'a>

Which kind of iterator are we turning this into?

impl PartialEq<CompactPathTree> for CompactPathTree[src]

impl StructuralEq for CompactPathTree[src]

impl StructuralPartialEq for CompactPathTree[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.