#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(super) enum DirectoryScan {
First,
Following,
Done,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(super) enum Query {
Restart,
Continue,
}
impl DirectoryScan {
pub fn query(&mut self) -> Option<Query> {
match self {
Self::First => {
*self = Self::Following;
Some(Query::Restart)
}
Self::Following => Some(Query::Continue),
Self::Done => None,
}
}
pub fn finish(&mut self) {
*self = Self::Done;
}
}