Trait file_source::paths_provider::PathsProvider

source ·
pub trait PathsProvider {
    type IntoIter: IntoIterator<Item = PathBuf>;

    // Required method
    fn paths(&self) -> Self::IntoIter;
}
Expand description

Represents the ability to enumerate paths.

For use at crate::FileServer.

§Notes

Ideally we’d use an iterator with bound lifetime here:

type Iter<'a>: Iterator<Item = PathBuf> + 'a;
fn paths(&self) -> Self::Iter<'_>;

However, that’s currently unavailable at Rust. See: https://github.com/rust-lang/rust/issues/44265

We use an IntoIter here as a workaround.

Required Associated Types§

source

type IntoIter: IntoIterator<Item = PathBuf>

Provides the iterator that returns paths.

Required Methods§

source

fn paths(&self) -> Self::IntoIter

Provides a set of paths.

Implementors§