Trait Flag

Source
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§

Source

fn clone_inner(&self) -> Box<dyn Flag>

Clone the boxed value and create a new box.

Source

fn must_be_unique(&self) -> bool

Whether the flag gets overridden by the same flag in revisions.

Provided Methods§

Source

fn apply( &self, _cmd: &mut Command, _config: &TestConfig, _build_manager: &BuildManager, ) -> Result<(), Errored>

Modify a command to what the flag specifies

Source

fn test_condition( &self, _config: &Config, _comments: &Comments, _revision: &str, ) -> bool

Whether this flag causes a test to be filtered out

Source

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§

Source§

impl Clone for Box<dyn Flag>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

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.

Implementors§