summaryrefslogtreecommitdiffstats
path: root/src/selection_type.rs
blob: e8341f45a731f11c4a581342462548f8ca0d52db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum SelectionType {
    File,
    Directory,
    Any,
}

impl SelectionType {
    pub fn respects(self, constraint: Self) -> bool {
        constraint == Self::Any || self == constraint
        //use SelectionType::*;
        //match (self, constraint) {
        //    (_, Undefined) => true, // no constraint
        //    (File, File) => true,
        //    (Directory, Directory) => true
        //}
    }
}