[][src]Struct cargo_tarpaulin::config::Config

pub struct Config {
    pub name: String,
    pub manifest: PathBuf,
    pub config: Option<PathBuf>,
    pub root: Option<String>,
    pub run_ignored: bool,
    pub ignore_tests: bool,
    pub ignore_panics: bool,
    pub force_clean: bool,
    pub verbose: bool,
    pub debug: 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 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 metadata: RefCell<Option<Metadata>>,
    // some fields omitted
}

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

root: Option<String>

Path to the projects cargo manifest

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.

force_clean: bool

Flag to add a clean step when preparing the target project

verbose: bool

Verbose flag for printing information to the user

debug: bool

Debug flag for printing internal debugging information to the user

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

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

metadata: RefCell<Option<Metadata>>

Implementations

impl Config[src]

pub fn target_dir(&self) -> PathBuf[src]

pub fn doctest_dir(&self) -> PathBuf[src]

pub fn root(&self) -> PathBuf[src]

pub fn get_packages(&self) -> Vec<Package>[src]

pub fn output_dir(&self) -> PathBuf[src]

pub fn get_config_vec(
    file_configs: Result<Vec<Self>>,
    backup: Self
) -> ConfigWrapper
[src]

pub fn check_for_configs(&self) -> Option<PathBuf>[src]

Taking an existing config look for any relevant config files

pub fn load_config_file<P: AsRef<Path>>(file: P) -> Result<Vec<Self>>[src]

pub fn parse_config_toml(buffer: &[u8]) -> Result<Vec<Self>>[src]

pub fn merge(&mut self, other: &Config)[src]

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

pub fn pick_optional_config<T: Clone>(
    base_config: &Option<T>,
    override_config: &Option<T>
) -> Option<T>
[src]

pub fn is_coveralls(&self) -> bool[src]

pub fn exclude_path(&self, path: &Path) -> bool[src]

pub fn get_base_dir(&self) -> PathBuf[src]

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

pub fn strip_base_dir(&self, path: &Path) -> PathBuf[src]

returns the relative path from the base_dir

pub fn is_default_output_dir(&self) -> bool[src]

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

impl<'de> Deserialize<'de> for Config where
    Config: Default
[src]

impl Serialize for Config[src]

Auto Trait Implementations

impl !RefUnwindSafe for Config

impl Send for Config

impl !Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.