1use std::{borrow::Cow, ffi, fs, path::PathBuf};
24
25struct EntryHandle<'d> {
26 inner: &'d fs::DirEntry,
27}
28
29impl<'d> EntryHandle<'d> {
30 pub(crate) const fn new(inner: &'d fs::DirEntry) -> Self { Self { inner } }
31
32 pub fn full_path(&self) -> PathBuf { self.inner.path() }
33}
34
35pub struct FileEntry<'d> {
36 inner: &'d fs::DirEntry,
37}
38
39impl<'d> FileEntry<'d> {
40 pub(crate) const fn new(inner: &'d fs::DirEntry) -> Self { Self { inner } }
41
42 pub fn file_name(&self) -> ffi::OsString { self.inner.file_name() }
43}
44
45pub struct DirEntry<'d> {
46 inner: &'d fs::DirEntry,
47}
48
49impl<'d> DirEntry<'d> {
50 pub(crate) const fn new(inner: &'d fs::DirEntry) -> Self { Self { inner } }
51
52 pub fn file_name(&self) -> ffi::OsString { self.inner.file_name() }
53}
54
55
56pub trait Visitor {}
57
58pub trait VisitorBuilder {
59 type Visitor<'s>: Visitor
60 where Self: 's;
61
62 fn build<'s, 't: 's>(&'t self) -> Self::Visitor<'s>;
63}