#[derive(Clone, PartialEq, Eq)]
pub enum BenchMode {
Auto,
Single,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum ShouldPanic {
No,
Yes,
YesWithMessage(&'static str),
}
#[derive(Copy, Clone, Default, Debug)]
pub enum ColorConfig {
#[default]
AutoColor,
AlwaysColor,
NeverColor,
}
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
pub enum OutputFormat {
Pretty,
#[default]
Terse,
Json,
Junit,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum RunIgnored {
Yes,
No,
Only,
}
#[derive(Clone, Copy)]
pub enum RunStrategy {
InProcess,
SpawnPrimary,
}
#[derive(Copy, Clone, Debug)]
pub struct Options {
pub display_output: bool,
pub panic_abort: bool,
}
impl Options {
pub fn new() -> Options {
Options { display_output: false, panic_abort: false }
}
pub fn display_output(mut self, display_output: bool) -> Options {
self.display_output = display_output;
self
}
pub fn panic_abort(mut self, panic_abort: bool) -> Options {
self.panic_abort = panic_abort;
self
}
}