pub struct Config {
Show 50 fields pub name: String, pub manifest: PathBuf, pub config: Option<PathBuf>, pub run_ignored: bool, pub ignore_tests: bool, pub ignore_panics: bool, pub all_targets: bool, pub verbose: bool, pub debug: bool, pub dump_traces: bool, pub count: bool, pub line_coverage: bool, pub branch_coverage: bool, pub output_directory: Option<PathBuf>, pub coveralls: Option<String>, pub ci_tool: Option<CiService>, pub report_uri: Option<String>, pub forward_signals: bool, pub all_features: bool, pub no_default_features: bool, pub all: bool, pub test_timeout: Duration, pub release: bool, pub no_run: bool, pub locked: bool, pub frozen: bool, pub target: Option<String>, pub offline: bool, pub command: Mode, pub run_types: Vec<RunType>, pub packages: Vec<String>, pub exclude: Vec<String>, pub varargs: Vec<String>, pub features: Option<String>, pub unstable_features: Vec<String>, pub generate: Vec<OutputFile>, pub test_names: HashSet<String>, pub bin_names: HashSet<String>, pub example_names: HashSet<String>, pub bench_names: HashSet<String>, pub no_fail_fast: bool, pub profile: Option<String>, pub fail_under: Option<f64>, pub metadata: RefCell<Option<Metadata>>, pub avoid_cfg_tarpaulin: bool, pub color: Color, pub follow_exec: bool, pub jobs: Option<usize>, pub implicit_test_threads: bool, pub rustflags: Option<String>, /* private fields */
}
Expand description

Specifies the current configuration tarpaulin is using.

Fields

name: Stringmanifest: PathBuf

Path to the projects cargo manifest

config: Option<PathBuf>

Path to a tarpaulin.toml config file

run_ignored: bool

Flag to also run tests with the ignored attribute

ignore_tests: bool

Flag to ignore test functions in coverage statistics

ignore_panics: bool

Ignore panic macros in code.

all_targets: boolverbose: bool

Verbose flag for printing information to the user

debug: bool

Debug flag for printing internal debugging information to the user

dump_traces: bool

Enable the event logger

count: bool

Flag to count hits in coverage

line_coverage: bool

Flag specifying to run line coverage (default)

branch_coverage: bool

Flag specifying to run branch coverage

output_directory: Option<PathBuf>

Directory to write output files

coveralls: Option<String>

Key relating to coveralls service or repo

ci_tool: Option<CiService>

Enum representing CI tool used.

report_uri: Option<String>

Only valid if coveralls option is set. If coveralls option is set, as well as report_uri, then the report will be sent to this endpoint instead.

forward_signals: bool

Forward unexpected signals back to the tracee. Used for tests which rely on signals to work.

all_features: bool

Include all available features in target build

no_default_features: bool

Do not include default features in target build

all: bool

Build all packages in the workspace

test_timeout: Duration

Duration to wait before a timeout occurs

release: bool

Build in release mode

no_run: bool

Build the tests only don’t run coverage

locked: bool

Don’t update Cargo.lock.

frozen: bool

Don’t update Cargo.lock or any caches.

target: Option<String>

Build for the target triple.

offline: bool

Run tarpaulin on project without accessing the network

command: Mode

Cargo subcommand to run. So far only test and build are supported

run_types: Vec<RunType>

Types of tests for tarpaulin to collect coverage on

packages: Vec<String>

Packages to include when building the target project

exclude: Vec<String>

Packages to exclude from testing

varargs: Vec<String>

Varargs to be forwarded to the test executables.

features: Option<String>

Features to include in the target project build, e.g. “feature1 feature2”

unstable_features: Vec<String>

Unstable cargo features to use

generate: Vec<OutputFile>

Output files to generate

test_names: HashSet<String>

Names of tests to run corresponding to cargo --test <NAME>...

bin_names: HashSet<String>

Names of binaries to run corresponding to cargo --bin <NAME>...

example_names: HashSet<String>

Names of examples to run corresponding to cargo --example <NAME>...

bench_names: HashSet<String>

Names of benches to run corresponding to cargo --bench <NAME>...

no_fail_fast: bool

Whether to carry on or stop when a test failure occurs

profile: Option<String>

Run with the given profile

fail_under: Option<f64>

returns a non-zero code if coverage is below the threshold

metadata: RefCell<Option<Metadata>>

Result of cargo_metadata ran on the crate

avoid_cfg_tarpaulin: bool

Don’t pass –cfg=tarpaulin to the ‘RUSTFLAG’

color: Color

Colouring of logging

follow_exec: bool

Follow traced executables down

jobs: Option<usize>

Number of jobs used for building the tests

implicit_test_threads: bool

Allow test to use an implicit test threads

rustflags: Option<String>

Specifying per-config rust flags

Implementations

This returns the engine selected for tarpaulin to run. This function will not return Auto instead it will resolve to the best-fit TraceEngine for the given configuration

Taking an existing config look for any relevant config files

Given a config made from args ignoring the config file take the relevant settings that should be carried across and move them

returns the relative path from the base_dir uses root if set, else env::current_dir()

returns the relative path from the base_dir

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more