Trait FileCollection

Source
pub trait FileCollection {
    // Required method
    fn files(&self) -> HashSet<PathBuf>;

    // Provided methods
    fn try_files(
        &self,
    ) -> Result<HashSet<PathBuf>, PayloadError<BuildException>> { ... }
    fn is_empty(&self) -> bool { ... }
    fn path(&self) -> Result<OsString, JoinPathsError> { ... }
}
Expand description

A file set is a collection of files. File collections are intended to be live.

Required Methods§

Source

fn files(&self) -> HashSet<PathBuf>

Gets the files contained by this collection.

Provided Methods§

Source

fn try_files(&self) -> Result<HashSet<PathBuf>, PayloadError<BuildException>>

Gets the files contained by this collection. Is fallible.

Source

fn is_empty(&self) -> bool

Gets whether this file collection is empty or not

Source

fn path(&self) -> Result<OsString, JoinPathsError>

Get this file collection as a path

Implementations on Foreign Types§

Source§

impl FileCollection for PathBuf

Source§

impl<P> FileCollection for LinkedList<P>
where P: AsRef<Path>,

Source§

impl<P> FileCollection for VecDeque<P>
where P: AsRef<Path>,

Source§

impl<P> FileCollection for Vec<P>
where P: AsRef<Path>,

Source§

impl<P> FileCollection for HashSet<P>
where P: AsRef<Path>,

Implementors§