use bitflags::bitflags;
bitflags! {
pub struct MatchOptions: u8 {
const NONE = 1 << 7;
const WILDCARDS = 1;
const UNKNOWN_CHARS = 1 << 1;
const ALL = 255 ^ (1 << 7);
}
}
impl From<char> for MatchOptions {
fn from(chr: char) -> Self {
match chr {
'*' => MatchOptions::WILDCARDS,
'?' => MatchOptions::UNKNOWN_CHARS,
_ => MatchOptions::NONE,
}
}
}