Struct runt::cli::Opts

source ·
pub struct Opts {
    pub dir: PathBuf,
    pub diff: bool,
    pub save: bool,
    pub dry_run: bool,
    pub verbose: bool,
    pub post_filter: Option<OnlyOpt>,
    pub exclude_filter: Option<String>,
    pub include_filter: Option<String>,
    pub jobs_limit: Option<usize>,
    pub max_futures: Option<usize>,
    pub version: bool,
}
Expand description

Lightweight snapshot testing framework

Fields§

§dir: PathBuf

test folder.

§diff: bool

show diffs for each failing test.

§save: bool

update expect files for displayed tests. Use the –only flag to save failing or missing tests.

§dry_run: bool

print out the commands to be run for each test case. Warning: Will probably generate a lot of text unless used with –include or –exclude

§verbose: bool

enable verbose printing

§post_filter: Option<OnlyOpt>

filter out the reported test results based on test status (“pass”, “fail”, “miss”) or a regex for the test file path. Applied after running the tests.

§exclude_filter: Option<String>

exclude matching tests using a regex on “:” strings Applied before running tests.

§include_filter: Option<String>

include matching tests using a regex on “:” strings Applied before running tests.

§jobs_limit: Option<usize>

limit the number of jobs to run in parallel. Defaults to number of logical cpus.

§max_futures: Option<usize>

maximum number of features that can be created for concurrent processing. Use a lower number if runt gives the “too many file handles” error. Defaults to 50.

§version: bool

print the version of runt

Trait Implementations§

source§

impl FromArgs for Opts

source§

fn from_args(__cmd_name: &[&str], __args: &[&str]) -> Result<Self, EarlyExit>

Construct the type from an input set of arguments. Read more
source§

fn redact_arg_values( __cmd_name: &[&str], __args: &[&str] ) -> Result<Vec<String>, EarlyExit>

Get a String with just the argument names, e.g., options, flags, subcommands, etc, but without the values of the options and arguments. This can be useful as a means to capture anonymous usage statistics without revealing the content entered by the end user. Read more
source§

impl TopLevelCommand for Opts

Auto Trait Implementations§

§

impl RefUnwindSafe for Opts

§

impl Send for Opts

§

impl Sync for Opts

§

impl Unpin for Opts

§

impl UnwindSafe for Opts

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.