2018-08-31 00:04:06 -07:00
|
|
|
use Verbosity::*;
|
|
|
|
|
|
|
|
#[derive(Copy, Clone)]
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) enum Verbosity {
|
2018-08-31 00:04:06 -07:00
|
|
|
Taciturn,
|
|
|
|
Loquacious,
|
|
|
|
Grandiloquent,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Verbosity {
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) fn from_flag_occurrences(flag_occurences: u64) -> Verbosity {
|
2018-08-31 00:04:06 -07:00
|
|
|
match flag_occurences {
|
|
|
|
0 => Taciturn,
|
|
|
|
1 => Loquacious,
|
|
|
|
_ => Grandiloquent,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) fn loquacious(self) -> bool {
|
2018-08-31 00:04:06 -07:00
|
|
|
match self {
|
|
|
|
Taciturn => false,
|
|
|
|
Loquacious => true,
|
|
|
|
Grandiloquent => true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-21 15:35:03 -07:00
|
|
|
pub(crate) fn grandiloquent(self) -> bool {
|
2018-08-31 00:04:06 -07:00
|
|
|
match self {
|
|
|
|
Taciturn => false,
|
|
|
|
Loquacious => false,
|
|
|
|
Grandiloquent => true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|