Trait FileParent

Source
pub trait FileParent<'region>: Sized {
    // Required methods
    fn new(
        region: &Region<'region, Self>,
        item: &FilePathType<'region, Self>,
    ) -> Self;
    fn path(&self) -> &Path;
}
Expand description

This trait is used to create parent nodes while walking directories/trees. You need to implement it for your type (it is already implemented for PathBuf).

Required Methods§

Source

fn new( region: &Region<'region, Self>, item: &FilePathType<'region, Self>, ) -> Self

Source

fn path(&self) -> &Path

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'region> FileParent<'region> for PathBuf

Source§

fn new( region: &Region<'region, Self>, item: &FilePathType<'region, Self>, ) -> Self

Source§

fn path(&self) -> &Path

Implementors§