pub trait Flag:
Send
+ Sync
+ UnwindSafe
+ RefUnwindSafe
+ Debug {
// Required methods
fn clone_inner(&self) -> Box<dyn Flag>;
fn must_be_unique(&self) -> bool;
// Provided methods
fn apply(
&self,
_cmd: &mut Command,
_config: &TestConfig,
_build_manager: &BuildManager,
) -> Result<(), Errored> { ... }
fn test_condition(
&self,
_config: &Config,
_comments: &Comments,
_revision: &str,
) -> bool { ... }
fn post_test_action(
&self,
_config: &TestConfig,
_output: &Output,
_build_manager: &BuildManager,
) -> Result<(), Errored> { ... }
}
Expand description
Tester-specific flag that gets parsed from //@
comments.
Required Methods§
Sourcefn clone_inner(&self) -> Box<dyn Flag>
fn clone_inner(&self) -> Box<dyn Flag>
Clone the boxed value and create a new box.
Sourcefn must_be_unique(&self) -> bool
fn must_be_unique(&self) -> bool
Whether the flag gets overridden by the same flag in revisions.
Provided Methods§
Sourcefn apply(
&self,
_cmd: &mut Command,
_config: &TestConfig,
_build_manager: &BuildManager,
) -> Result<(), Errored>
fn apply( &self, _cmd: &mut Command, _config: &TestConfig, _build_manager: &BuildManager, ) -> Result<(), Errored>
Modify a command to what the flag specifies
Sourcefn test_condition(
&self,
_config: &Config,
_comments: &Comments,
_revision: &str,
) -> bool
fn test_condition( &self, _config: &Config, _comments: &Comments, _revision: &str, ) -> bool
Whether this flag causes a test to be filtered out
Sourcefn post_test_action(
&self,
_config: &TestConfig,
_output: &Output,
_build_manager: &BuildManager,
) -> Result<(), Errored>
fn post_test_action( &self, _config: &TestConfig, _output: &Output, _build_manager: &BuildManager, ) -> Result<(), Errored>
Run an action after a test is finished.
Returns an empty Vec
if no action was taken.
Trait Implementations§
Implementations on Foreign Types§
Source§impl Flag for ()
Use the unit type for when you don’t need any behaviour and just need to know if the flag was set or not.
impl Flag for ()
Use the unit type for when you don’t need any behaviour and just need to know if the flag was set or not.