Trait hoard::filters::Filter

source ·
pub trait Filter: Sized {
    // Required methods
    fn new(pile_config: &PileConfig) -> Self;
    fn keep(&self, prefix: &SystemPath, path: &RelativePath) -> bool;
}
Expand description

The Filter trait provides a common interface for all filters.

Required Methods§

source

fn new(pile_config: &PileConfig) -> Self

Creates a new instance of something that implements Filter.

Errors

Any errors that may occur while creating the new filter.

source

fn keep(&self, prefix: &SystemPath, path: &RelativePath) -> bool

Whether or not the file should be kept (backed up).

Object Safety§

This trait is not object safe.

Implementors§