Skip to main content

NextestConfig

Struct NextestConfig 

Source
pub struct NextestConfig { /* private fields */ }
Expand description

Overall configuration for nextest.

This is the root data structure for nextest configuration. Most runner-specific configuration is managed through profiles, obtained through the profile method.

For more about configuration, see Configuration in the nextest book.

Implementations§

Source§

impl NextestConfig

Source

pub const CONFIG_PATH: &'static str = ".config/nextest.toml"

The default location of the config within the path: .config/nextest.toml, used to read the config from the given directory.

Source

pub const DEFAULT_CONFIG: &'static str = "# This is the default config used by nextest. It is embedded in the binary at\n# build time. It may be used as a template for .config/nextest.toml.\n\n[store]\n# The directory under the workspace root at which nextest-related files are\n# written. Profile-specific storage is currently written to dir/<profile-name>.\ndir = \"target/nextest\"\n\n# This section defines the default nextest profile. Custom profiles are layered\n# on top of the default profile.\n[profile.default]\n# The set of tests run by `cargo nextest run` by default.\ndefault-filter = \"all()\"\n\n# Retry policy for failed tests. A non-zero value causes tests that pass on a\n# subsequent attempt to be marked as flaky. Can be overridden through the\n# `--retries` option.\nretries = 0\n\n# Whether to treat flaky tests as passing or failing.\nflaky-result = \"pass\"\n\n# Number of threads to run tests with. Either an integer or \"num-cpus\". Can be\n# overridden through the `--test-threads` option.\ntest-threads = \"num-cpus\"\n\n# Number of threads (slots) each test reserves from the pool. Generally used in\n# overrides to mark certain tests as heavier than others; can also be set as a\n# global default.\nthreads-required = 1\n\n# Extra arguments to pass to test binaries at runtime. Intended primarily for\n# communication with custom test harnesses -- use with caution!\nrun-extra-args = []\n\n# Level of status information to display during test runs.\n#\n# Can be overridden through the `--status-level` flag.\nstatus-level = \"pass\"\n\n# Level of status information to display in the final summary. Differs from\n# status-level in that it has a separate \"flaky\" indicator distinct from\n# \"retry\" (though \"retry\" works as an alias), and in that \"skip\" is prioritized\n# over \"pass\".\nfinal-status-level = \"flaky\"\n\n# When to display output for failed tests.\n#\n# Can be overridden through the `--failure-output` option.\nfailure-output = \"immediate\"\n\n# When to display output for successful tests. Generally best left as \"never\".\nsuccess-output = \"never\"\n\n# Failure handling for the test run.\n#\n# For CI runs, consider setting this to false.\nfail-fast = true\n\n# Treat a test that takes longer than the configured \'period\' as slow, and print\n# a message. See <https://nexte.st/docs/features/slow-tests> for more\n# information.\nslow-timeout = { period = \"60s\", on-timeout = \"fail\" }\n\n# Time after which benchmarks are considered slow, plus optional termination\n# policy. Replaces `slow-timeout` when running `cargo nextest bench`.\n# See <https://nexte.st/docs/features/slow-tests> for more information.\n#\n# Benchmarks have a separate configuration because they are often expected to\n# take longer than tests. Defaults to 30 years, which is a large enough value\n# to feel \"infinite\" without running into overflows on various platforms.\nbench.slow-timeout = { period = \"30y\" }\n\n# Global timeout for the entire benchmark run. Replaces `global-timeout` when\n# running `cargo nextest bench`.\n#\n# Benchmarks have a separate configuration because they are often expected to\n# take longer than tests. Defaults to 30 years, which is a large enough value\n# to feel \"infinite\" without running into overflows on various platforms.\nbench.global-timeout = \"30y\"\n\n# Treat a test as leaky if after the process is shut down, standard output and\n# standard error aren\'t closed within this duration.\n#\n# This usually happens in case of a test that creates a child process and lets\n# it inherit those handles, but doesn\'t clean the child process up (especially\n# when it fails).\n#\n# See <https://nexte.st/docs/features/leaky-tests> for more information.\nleak-timeout = \"200ms\"\n\n# Stop all tests after the configured global timeout.\n#\n# Defaults to 30 years, which is a large enough value to feel \"infinite\" without\n# running into overflows on various platforms.\nglobal-timeout = \"30y\"\n\n# Extra paths to include in `nextest archive`. The standard build output is\n# included automatically; use this to add any non-standard files the tests\n# need at runtime.\narchive.include = []\n\n[profile.default.junit]\n# Path to write the JUnit XML report to, relative to \'store.dir/<profile-name>\'.\n# If unset, JUnit reporting is disabled.\n\n# path = \"junit.xml\"\n\n# Name for the JUnit XML report. When aggregating reports across different test\n# runs, it may be useful to provide separate names for each report.\nreport-name = \"nextest-run\"\n\n# Whether to store successful test output in the JUnit XML report. When true,\n# output is stored in the <system-out> and <system-err> elements of the\n# <testcase> element.\nstore-success-output = false\n\n# Whether to store failed test output in the JUnit XML report. When true,\n# output is stored in the <system-out> and <system-err> elements of the\n# <testcase> element.\n#\n# Note that if a description can be extracted from the output, it is always\n# stored in the <description> element.\nstore-failure-output = true\n\n# How flaky-fail tests are reported in the JUnit XML report. \"failure\" reports\n# them as failures with <failure> and <flakyFailure> elements; \"success\"\n# reports them as successes, identical to flaky-pass tests.\nflaky-fail-status = \"failure\"\n\n# This profile is activated if MIRI_SYSROOT is set.\n[profile.default-miri]\n"

Contains the default config as a TOML file.

Repository-specific configuration is layered on top of the default config.

Source

pub const REFERENCE_MD: &'static str = "For more information about how repository configuration works, see the [main configuration page](index.md).\n\n## Configuration file locations\n\nConfiguration is loaded in the following order (higher priority overrides lower):\n\n1. Repository config (`.config/nextest.toml`)\n2. Tool-specific configs (specified via `--tool-config-file`)\n3. Default embedded config\n\nTool-specific configs allow tools to provide their own nextest configuration that integrates with repository settings.\n\nFor more information about configuration hierarchy, see [_Hierarchical configuration_](index.md#hierarchical-configuration).\n\n## Repository configuration schema\n\n<!-- md:version 0.9.134 -->\n\nA JSON Schema is available for nextest\'s repository configuration. The schema can be obtained through:\n\n- For the latest released version of nextest, at [`https://nexte.st/schemas/repo-config.json`](https://nexte.st/schemas/repo-config.json). This URL is updated with new nextest releases.\n- For the schema corresponding to a particular version of nextest, by running `cargo nextest self schema repo-config`.\n\nThe schema can be used:\n\n- To validate a repository configuration file.\n- With the [Tombi](https://tombi-toml.github.io/tombi) language server for TOML or [RustRover](../integrations/rustrover.md), to provide autocomplete in supported IDEs and editors. (The taplo language server is not supported due to a [crash bug](https://github.com/tamasfe/taplo/pull/779).)\n\nNote that the schema is somewhat stricter than nextest\'s own config parser: unknown configuration items will fail schema validation, while nextest itself will only print out a warning.\n\nThe schema is part of the [JSON Schema Store](https://www.schemastore.org/), so both Tombi and RustRover will automatically download it for you. Because nextest\'s configuration (outside of experimental configuration) is [append-only](../stability/index.md), the schema will automatically be updated as new nextest versions are released.\n\n## Top-level configuration\n\nThese parameters are specified at the root level of the configuration file.\n\n### `nextest-version`\n\n<!-- md:version 0.9.55 -->\n\n- **Type**: String or object\n- **Description**: The minimum required (and optionally recommended) version of nextest for this configuration.\n- **Documentation**: [_Minimum nextest versions_](minimum-versions.md)\n- **Default**: Unset (the minimum version check is disabled)\n- **Examples**:\n ```toml\n nextest-version = \"0.9.50\"\n # or\n nextest-version = { required = \"0.9.20\", recommended = \"0.9.30\" }\n ```\n\n### `experimental`\n\n- **Type**: Array of strings\n- **Description**: Enables experimental, non-stable features.\n- **Documentation**: [_Setup scripts_](setup-scripts.md), [_wrapper scripts_](wrapper-scripts.md)\n- **Default**: `[]` (no experimental features enabled)\n- **Valid values**:\n - `\"setup-scripts\"` <!-- md:version 0.9.98 --> (originally <!-- md:version 0.9.59 -->)\n - `\"wrapper-scripts\"` <!-- md:version 0.9.98 -->\n- **Example**:\n ```toml\n experimental = [\"setup-scripts\"]\n ```\n\n### `store`\n\n- **Type**: Object\n- **Description**: Configuration for the nextest store directory.\n\n#### `store.dir`\n\n- **Type**: String (path)\n- **Description**: Directory where nextest stores its data.\n- **Default**: `target/nextest`\n\n## Profile configuration\n\nProfiles are configured under `[profile.<name>]`. The default profile is called `[profile.default]`.\n\n### General configuration\n\n#### `profile.<name>.inherits`\n\n<!-- md:version 0.9.115 -->\n\n- **Type**: String\n- **Description**: The profile to inherit settings from.\n- **Documentation**: [_Profile inheritance_](index.md#profile-inheritance)\n- **Default**: `\"default\"`\n\n### Core test execution\n\n#### `profile.<name>.default-filter`\n\n- **Type**: String (filterset expression)\n- **Description**: The default set of tests run by `cargo nextest run`, as a filterset expression.\n- **Documentation**: [_Running a subset of tests by default_](../selecting.md#running-a-subset-of-tests-by-default)\n- **Default**: `\"all()\"` (all tests are run)\n- **Example**: `default-filter = \"not test(very_slow_tests)\"`\n\n#### `profile.<name>.global-timeout`\n\n<!-- md:version 0.9.100 -->\n\n- **Type**: String (duration)\n- **Description**: A global timeout for the entire test run.\n- **Documentation**: [_Setting a global timeout_](../features/slow-tests.md#setting-a-global-timeout)\n- **Default**: Unset (no global timeout)\n- **Example**: `global-timeout = \"2h\"`\n\n#### `profile.<name>.test-threads`\n\n- **Type**: Integer or string\n- **Description**: Number of threads to run tests with.\n- **Valid values**: Positive integer, negative integer (relative to CPU count), or `\"num-cpus\"`\n- **Default**: `\"num-cpus\"`\n- **Example**: `test-threads = 4` or `test-threads = \"num-cpus\"`\n\n#### `profile.<name>.threads-required`\n\n- **Type**: Integer or string\n- **Description**: Number of threads each test reserves from the pool.\n- **Documentation**: [_Heavy tests and `threads-required`_](threads-required.md)\n- **Valid values**: Positive integer, `\"num-cpus\"`, or `\"num-test-threads\"`\n- **Default**: `1`\n\n#### `profile.<name>.run-extra-args`\n\n<!-- md:version 0.9.86 -->\n\n- **Type**: Array of strings\n- **Description**: Extra arguments to pass to test binaries.\n- **Documentation**: [_Extra arguments_](extra-args.md)\n- **Default**: `[]`\n- **Example**: `run-extra-args = [\"--test-threads\", \"1\"]`\n\n### Retry configuration\n\n#### `profile.<name>.retries`\n\n- **Type**: Integer or object\n- **Description**: Retry policy for failed tests.\n- **Documentation**: [_Retries and flaky tests_](../features/retries.md)\n- **Default**: `0`\n- **Examples**:\n ```toml\n retries = 3\n # or\n retries = { backoff = \"fixed\", count = 3, delay = \"1s\" }\n # or\n retries = { backoff = \"exponential\", count = 4, delay = \"2s\", max-delay = \"10s\", jitter = true }\n ```\n\n#### `profile.<name>.flaky-result`\n\n<!-- md:version 0.9.131 -->\n\n- **Type**: String\n- **Description**: Whether to treat flaky tests as passing or failing.\n- **Documentation**: [_Failing flaky tests_](../features/retries.md#failing-flaky-tests)\n- **Valid values**: `\"pass\"`, `\"fail\"`\n- **Default**: `\"pass\"`\n- **Example**: `flaky-result = \"fail\"`\n\n### Timeout configuration\n\n#### `profile.<name>.slow-timeout`\n\n- **Type**: String (duration) or object\n- **Description**: Time after which tests are considered slow, plus optional termination policy.\n- **Documentation**: [_Slow tests and timeouts_](../features/slow-tests.md)\n- **Default**: `60s` with no termination on timeout\n- **Examples**:\n ```toml\n slow-timeout = \"60s\"\n # or\n slow-timeout = { period = \"120s\", terminate-after = 2, grace-period = \"10s\" }\n # or\n slow-timeout = { period = \"30s\", terminate-after = 4, on-timeout = \"pass\" }\n ```\n\nThe `slow-timeout` object accepts the following parameters:\n\n- `period`: Time period after which a test is considered slow (required)\n- `terminate-after`: Number of periods after which to terminate the test (default: do not terminate)\n- `grace-period`: Time to wait for graceful shutdown before force termination (default: 10s)\n- `on-timeout`: <!-- md:version 0.9.115 --> What to do when a test times out: `\"fail\"` (default) or `\"pass\"`\n\n#### `profile.<name>.leak-timeout`\n\n- **Type**: String (duration) or object\n- **Description**: Time to wait for child processes to exit after a test completes.\n- **Documentation**: [_Leaky tests_](../features/leaky-tests.md)\n- **Examples**:\n ```toml\n leak-timeout = \"100ms\"\n # or\n leak-timeout = { period = \"500ms\", result = \"fail\" }\n ```\n\n### Benchmark configuration\n\n#### `profile.<name>.bench.global-timeout`\n\n<!-- md:version 0.9.117 -->\n\n- **Type**: String (duration)\n- **Description**: Global timeout for the entire benchmark run. Replaces `global-timeout` when running `cargo nextest bench`.\n- **Documentation**: [_Running benchmarks_](../features/benchmarks.md)\n- **Default**: Unset (no global timeout)\n- **Example**: `bench.global-timeout = \"2h\"`\n\n#### `profile.<name>.bench.slow-timeout`\n\n<!-- md:version 0.9.117 -->\n\n- **Type**: String (duration) or object\n- **Description**: Time after which benchmarks are considered slow, plus optional termination policy. Replaces `slow-timeout` when running `cargo nextest bench`.\n- **Documentation**: [_Running benchmarks_](../features/benchmarks.md)\n- **Default**: Unset\n- **Examples**:\n ```toml\n bench.slow-timeout = \"120s\"\n # or\n bench.slow-timeout = { period = \"60s\", terminate-after = 10, grace-period = \"10s\" }\n ```\n\nThe `bench.slow-timeout` object accepts the same parameters as `slow-timeout`:\n\n- `period`: Time period after which a benchmark is considered slow (required)\n- `terminate-after`: Number of periods after which to terminate the benchmark (default: do not terminate)\n- `grace-period`: Time to wait for graceful shutdown before force termination (default: 10s)\n\n### Reporter options\n\n#### `profile.<name>.status-level`\n\n- **Type**: String\n- **Description**: Level of status information to display during test runs.\n- **Documentation**: [_Reporting test results_](../reporting.md)\n- **Valid values** (incremental; each level includes those above it):\n - `\"none\"`: no output.\n - `\"fail\"`: only output test failures.\n - `\"retry\"`: output test retries; includes `fail`.\n - `\"slow\"`: output slow tests; includes `retry`.\n - `\"leak\"`: output leaky tests; includes `slow`.\n - `\"pass\"`: output passing tests; includes `leak`.\n - `\"skip\"`: output skipped tests; includes `pass`.\n - `\"all\"`: equivalent to `\"skip\"` today; reserved for future expansion.\n- **Default**: `\"pass\"`\n\n#### `profile.<name>.final-status-level`\n\n- **Type**: String\n- **Description**: Level of status information to display in the final summary.\n- **Documentation**: [_Reporting test results_](../reporting.md)\n- **Valid values** (incremental; each level includes those above it):\n - `\"none\"`: no output.\n - `\"fail\"`: only output test failures.\n - `\"flaky\"`: output flaky tests; includes `fail`. Accepts `\"retry\"` as an alias.\n - `\"slow\"`: output slow tests; includes `flaky`.\n - `\"skip\"`: output skipped tests; includes `slow`.\n - `\"leak\"`: output leaky tests; includes `skip`.\n - `\"pass\"`: output passing tests; includes `leak`.\n - `\"all\"`: equivalent to `\"pass\"` today; reserved for future expansion.\n- **Default**: `\"flaky\"`\n\n#### `profile.<name>.failure-output`\n\n- **Type**: String\n- **Description**: When to display output for failed tests.\n- **Documentation**: [_Reporting test results_](../reporting.md)\n- **Valid values**:\n - `\"immediate\"`: show captured output as soon as the test completes.\n - `\"immediate-final\"`: show captured output when the test completes _and_ again at the end of the run.\n - `\"final\"`: show captured output only at the end of the run.\n - `\"never\"`: never show captured output.\n- **Default**: `\"immediate\"`\n\n#### `profile.<name>.success-output`\n\n- **Type**: String\n- **Description**: When to display output for successful tests.\n- **Documentation**: [_Reporting test results_](../reporting.md)\n- **Valid values**: same as [`failure-output`](#profilenamefailure-output)\n- **Default**: `\"never\"`\n\n### Failure handling\n\n#### `profile.<name>.fail-fast`\n\n- **Type**: Boolean or object\n- **Description**: Controls when to stop running tests after failures.\n- **Documentation**: [_Failing fast_](../running.md#failing-fast)\n- **Default**: `true` (stop after first failure, wait for running tests to complete)\n- **Examples**:\n ```toml\n fail-fast = true # Stop after first failure (waits for running tests)\n fail-fast = false # Run all tests\n fail-fast = { max-fail = 5 } # Stop after 5 failures (waits for running tests)\n fail-fast = { max-fail = \"all\" } # Run all tests\n\n # With termination mode (since 0.9.111)\n fail-fast = { max-fail = 1, terminate = \"wait\" } # Wait for running tests (default)\n fail-fast = { max-fail = 1, terminate = \"immediate\" } # Terminate running tests immediately\n ```\n\nWhen `max-fail` is exceeded:\n- **`terminate = \"wait\"`** (default): nextest stops scheduling new tests but waits for currently running tests to finish naturally.\n- **`terminate = \"immediate\"`** <!-- md:version 0.9.111 -->: nextest sends termination signals to running tests (respecting the grace period configured via `slow-timeout.terminate-after`).\n\n### Test grouping\n\n#### `profile.<name>.test-group`\n\n<!-- md:version 0.9.48 -->\n\n- **Type**: String\n- **Description**: Assigns matching tests to a custom test group for resource management.\n- **Documentation**: [_Test groups for mutual exclusion_](test-groups.md)\n- **Valid values**: Custom group name or `\"@global\"`\n- **Default**: `\"@global\"`\n\n### JUnit configuration\n\n#### `profile.<name>.junit.path`\n\n- **Type**: String (path)\n- **Description**: Path to write the JUnit XML report to. If unset, JUnit reporting is disabled.\n- **Documentation**: [_JUnit support_](../machine-readable/junit.md)\n- **Default**: Unset\n- **Example**: `junit.path = \"target/nextest/junit.xml\"`\n\n#### `profile.<name>.junit.report-name`\n\n- **Type**: String\n- **Description**: Name for the JUnit XML report.\n- **Documentation**: [_JUnit support_](../machine-readable/junit.md)\n- **Default**: `\"nextest-run\"`\n\n#### `profile.<name>.junit.store-success-output`\n\n- **Type**: Boolean\n- **Description**: Whether to store successful test output in the JUnit XML report.\n- **Documentation**: [_JUnit support_](../machine-readable/junit.md)\n- **Default**: `false`\n\n#### `profile.<name>.junit.store-failure-output`\n\n- **Type**: Boolean\n- **Description**: Whether to store failed test output in the JUnit XML report.\n- **Documentation**: [_JUnit support_](../machine-readable/junit.md)\n- **Default**: `true`\n\n#### `profile.<name>.junit.flaky-fail-status`\n\n<!-- md:version 0.9.131 -->\n\n- **Type**: String\n- **Description**: How flaky-fail tests are reported in the JUnit XML report.\n- **Documentation**: [_JUnit support_](../machine-readable/junit.md)\n- **Valid values**: `\"failure\"` or `\"success\"`\n- **Default**: `\"failure\"`\n\n### Archive configuration\n\n<!-- md:version 0.9.70 -->\n\n#### `profile.<name>.archive.include`\n\n- **Type**: Array of objects\n- **Description**: Extra paths to include in the archive.\n- **Documentation**: [_Archiving and reusing builds_](../ci-features/archiving.md)\n- **Example**:\n ```toml\n [[profile.default.archive.include]]\n path = \"fixtures\"\n relative-to = \"target\"\n depth = 2\n on-missing = \"warn\"\n ```\n\n##### Archive include parameters\n\n- `path`: Path to include, relative to `relative-to`.\n- `relative-to`: Base directory `path` is interpreted relative to. Valid values: `\"target\"`.\n- `depth`: Maximum recursion depth (non-negative integer or `\"infinite\"`).\n- `on-missing`: What to do if `path` is missing. Valid values: `\"ignore\"`, `\"warn\"`, `\"error\"`.\n\n## Override configuration\n\nOverrides allow you to customize settings for specific tests or platforms using `[[profile.<name>.overrides]]` sections.\n\nFor detailed information, see [_Per-test settings_](per-test-overrides.md).\n\n### Override filters\n\nAt least one of these filters must be specified.\n\n#### `filter`\n\n- **Type**: String (filterset expression)\n- **Description**: Filterset expression selecting tests this override applies to.\n- **Documentation**: [_Filterset DSL_](../filtersets/index.md)\n- **Default**: Override applies to all tests\n- **Example**: `filter = \'test(integration_test)\'`\n\n#### `platform`\n\n<!-- md:version 0.9.58 -->\n\n- **Type**: String or Object\n- **Description**: Host and/or target platforms this override applies to.\n- **Documentation**: [_Specifying platforms_](specifying-platforms.md)\n- **Default**: Override applies to all platforms\n- **Examples**:\n ```toml\n platform = \"x86_64-unknown-linux-gnu\"\n # or\n platform = { host = \"cfg(unix)\", target = \"aarch64-apple-darwin\" }\n ```\n\n### Override settings\n\n#### `default-filter`\n\n<!-- md:version 0.9.84 -->\n\n- **Type**: String (filterset expression)\n- **Description**: Replaces `default-filter` for matching platforms. Requires `platform` and must not be combined with `filter`.\n- **Documentation**: [_Running a subset of tests by default_](../selecting.md#running-a-subset-of-tests-by-default)\n\n#### `priority`\n\n<!-- md:version 0.9.91 -->\n\n- **Type**: Integer (-100 to 100)\n- **Description**: Priority for matching tests; higher values run sooner.\n- **Documentation**: [_Test priorities_](test-priorities.md)\n- **Default**: `0`\n\n#### Other settings\n\nAll profile-level settings can be overridden:\n\n- `threads-required`\n- `run-extra-args`\n- `retries`\n- `flaky-result`\n- `slow-timeout`\n- `bench.slow-timeout`\n- `leak-timeout`\n- `test-group`\n- `success-output`\n- `failure-output`\n- `junit.store-success-output`\n- `junit.store-failure-output`\n\n## Test group configuration\n\n<!-- md:version 0.9.48 -->\n\nCustom test groups are defined under `[test-groups.<name>]` sections.\n\nFor detailed information, see [_Test groups for mutual exclusion_](test-groups.md).\n\n#### `test-groups.<name>.max-threads`\n\n- **Type**: Integer or string\n- **Description**: Maximum number of threads this test group may use concurrently.\n- **Valid values**: Positive integer or `\"num-cpus\"`\n\n## Script configuration\n\n<!-- md:version 0.9.59 -->\n\nScripts are configured under `[scripts.setup.<name>]` and `[scripts.wrapper.<name>]` sections.\n\n### Setup scripts\n\n<!-- md:version 0.9.98 -->\n\nFor detailed information, see [_Setup scripts_](setup-scripts.md).\n\n#### `scripts.setup.<name>.command`\n\n- **Type**: String, array, or object\n- **Description**: The command to run for this setup script.\n- **Examples**:\n ```toml\n command = \"echo hello\"\n # or\n command = [\"cargo\", \"run\", \"--bin\", \"setup\"]\n # or\n command = { command-line = \"debug/my-setup\", relative-to = \"target\" }\n ```\n\n#### `scripts.setup.<name>.slow-timeout`\n\n- **Type**: String (duration) or object\n- **Description**: Slow-timeout configuration for this setup script.\n- **Default**: No timeout\n- **Examples**:\n ```toml\n slow-timeout = \"30s\"\n # or\n slow-timeout = { period = \"60s\", terminate-after = 1, grace-period = \"5s\" }\n ```\n\n#### `scripts.setup.<name>.leak-timeout`\n\n- **Type**: String (duration) or object\n- **Description**: Leak-timeout configuration for this setup script.\n- **Default**: `200ms`\n- **Examples**:\n ```toml\n leak-timeout = \"500ms\"\n # or\n leak-timeout = { period = \"1s\", result = \"fail\" }\n ```\n\n#### `scripts.setup.<name>.capture-stdout`\n\n- **Type**: Boolean\n- **Description**: Whether to capture stdout from this setup script.\n- **Default**: `false`\n\n#### `scripts.setup.<name>.capture-stderr`\n\n- **Type**: Boolean\n- **Description**: Whether to capture stderr from this setup script.\n- **Default**: `false`\n\n#### `scripts.setup.<name>.junit.store-success-output`\n\n- **Type**: Boolean\n- **Description**: Whether to store this setup script\'s output on success in the JUnit XML report.\n- **Default**: `true`\n\n#### `scripts.setup.<name>.junit.store-failure-output`\n\n- **Type**: Boolean\n- **Description**: Whether to store this setup script\'s output on failure in the JUnit XML report.\n- **Default**: `true`\n\n### Wrapper scripts\n\n<!-- md:version 0.9.98 -->\n\nFor detailed information, see [_Wrapper scripts_](wrapper-scripts.md).\n\n#### `scripts.wrapper.<name>.command`\n\n- **Type**: String, array, or object\n- **Description**: The command to run as the wrapper.\n- **Examples**:\n ```toml\n command = \"my-script.sh\"\n # or\n command = [\"cargo\", \"run\", \"--bin\", \"setup\", \"--\"]\n # or\n command = { command-line = \"debug/my-setup\", relative-to = \"target\" }\n ```\n\n#### `scripts.wrapper.<name>.target-runner`\n\n- **Type**: String\n- **Description**: How this wrapper composes with a configured target runner.\n- **Documentation**: [_Target runners_](../features/target-runners.md)\n- **Valid values**:\n - `\"ignore\"`: the target runner is ignored.\n - `\"overrides-wrapper\"`: when a target runner is configured, it replaces the wrapper; otherwise the wrapper runs as usual.\n - `\"within-wrapper\"`: the target runner runs within the wrapper script (command line: `<wrapper> <target-runner> <test-binary> <args>`).\n - `\"around-wrapper\"`: the target runner runs around the wrapper script (command line: `<target-runner> <wrapper> <test-binary> <args>`).\n- **Default**: `\"ignore\"`\n\n## Profile script configuration\n\n<!-- md:version 0.9.59 -->\n\nProfile-specific script configuration under `[[profile.<name>.scripts]]` sections.\n\n### Profile script filters\n\nAt least one of these filters must be specified.\n\n#### `platform`\n\n- **Type**: String or object\n- **Description**: Host and/or target platforms these scripts apply to.\n- **Documentation**: [_Specifying platforms_](specifying-platforms.md)\n- **Default**: Scripts apply to all platforms\n- **Examples**:\n ```toml\n platform = \"x86_64-unknown-linux-gnu\"\n # or\n platform = { host = \"cfg(unix)\", target = \"aarch64-apple-darwin\" }\n ```\n\n#### `filter`\n\n- **Type**: String (filterset expression)\n- **Description**: Filterset expression selecting tests these scripts apply to.\n- **Documentation**: [_Filterset DSL_](../filtersets/index.md)\n- **Default**: Scripts apply to all tests\n- **Example**: `filter = \'test(integration_test)\'`\n\n### Profile script instructions\n\nAt least one instruction must be specified.\n\n#### `setup`\n\n- **Type**: String or array of strings\n- **Description**: Names of setup scripts to run (single name or array).\n- **Documentation**: [_Setup scripts_](setup-scripts.md)\n- **Examples**:\n ```toml\n setup = \"my-setup\"\n # or\n setup = [\"setup1\", \"setup2\"]\n ```\n\n#### `list-wrapper`\n\n- **Type**: String\n- **Description**: Name of the wrapper script used during test listing.\n- **Documentation**: [_Wrapper scripts_](wrapper-scripts.md)\n- **Example**: `list-wrapper = \"my-list-wrapper\"`\n\n#### `run-wrapper`\n\n- **Type**: String\n- **Description**: Name of the wrapper script used during test execution.\n- **Documentation**: [_Wrapper scripts_](wrapper-scripts.md)\n- **Example**: `run-wrapper = \"my-run-wrapper\"`\n"

Contains the canonical repository config reference markdown.

Source

pub const SCHEMA: &'static str = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"NextestConfigDeserialize\",\n \"type\": \"object\",\n \"properties\": {\n \"experimental\": {\n \"description\": \"Enables experimental, non-stable features.\",\n \"$ref\": \"#/$defs/ExperimentalDeserialize\"\n },\n \"nextest-version\": {\n \"description\": \"The minimum required (and optionally recommended) version of nextest\\nfor this configuration.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/NextestVersionDeserialize\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"profile\": {\n \"description\": \"Test profiles, keyed by profile name.\",\n \"type\": [\n \"object\",\n \"null\"\n ],\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/CustomProfileImpl\"\n }\n },\n \"script\": {\n \"description\": \"Deprecated location for setup scripts.\\n\\nNew configurations should use `[scripts.setup.<name>]` instead.\",\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/SetupScriptConfig\"\n }\n },\n \"scripts\": {\n \"description\": \"Setup and wrapper scripts, keyed by script name.\",\n \"$ref\": \"#/$defs/ScriptConfig\"\n },\n \"store\": {\n \"description\": \"Configuration for the nextest store directory.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/StoreConfigImpl\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"test-groups\": {\n \"description\": \"Custom test groups for mutual exclusion and resource management, keyed\\nby group name.\",\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/TestGroupConfig\"\n }\n }\n },\n \"additionalProperties\": false,\n \"x-tombi-toml-version\": \"v1.1.0\",\n \"$defs\": {\n \"ArchiveConfig\": {\n \"description\": \"Archive configuration for this profile.\",\n \"type\": \"object\",\n \"properties\": {\n \"include\": {\n \"description\": \"Extra paths to include in the archive.\",\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"items\": {\n \"$ref\": \"#/$defs/ArchiveInclude\"\n }\n }\n },\n \"additionalProperties\": false\n },\n \"ArchiveInclude\": {\n \"description\": \"A single entry under `archive.include`.\",\n \"type\": \"object\",\n \"properties\": {\n \"depth\": {\n \"description\": \"Maximum recursion depth: a non-negative integer, or `\\\"infinite\\\"`.\",\n \"oneOf\": [\n {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n {\n \"type\": \"string\",\n \"enum\": [\n \"infinite\"\n ]\n }\n ]\n },\n \"on-missing\": {\n \"description\": \"What to do if `path` is missing: `\\\"ignore\\\"`, `\\\"warn\\\"`, or `\\\"error\\\"`.\",\n \"$ref\": \"#/$defs/ArchiveIncludeOnMissing\"\n },\n \"path\": {\n \"description\": \"Path to include, relative to `relative-to`.\",\n \"type\": \"string\"\n },\n \"relative-to\": {\n \"description\": \"Base directory `path` is interpreted relative to.\",\n \"$ref\": \"#/$defs/ArchiveRelativeTo\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"path\",\n \"relative-to\"\n ]\n },\n \"ArchiveIncludeOnMissing\": {\n \"description\": \"What to do when an `archive.include` path is missing.\",\n \"oneOf\": [\n {\n \"description\": \"Skip the missing path (printed in verbose mode).\",\n \"type\": \"string\",\n \"const\": \"ignore\"\n },\n {\n \"description\": \"Print a warning and continue.\",\n \"type\": \"string\",\n \"const\": \"warn\"\n },\n {\n \"description\": \"Produce an error and abort the archive operation.\",\n \"type\": \"string\",\n \"const\": \"error\"\n }\n ]\n },\n \"ArchiveRelativeTo\": {\n \"description\": \"Base directory `path` is interpreted relative to.\",\n \"oneOf\": [\n {\n \"description\": \"Resolve `path` against the target directory.\",\n \"type\": \"string\",\n \"const\": \"target\"\n }\n ]\n },\n \"BenchConfig\": {\n \"description\": \"Benchmark-specific timeout overrides used when running\\n`cargo nextest bench`.\\n\\nEach field, if set, replaces its non-`bench` counterpart for benchmark\\nruns only.\",\n \"type\": \"object\",\n \"properties\": {\n \"global-timeout\": {\n \"description\": \"Global timeout for the entire benchmark run. Replaces `global-timeout`\\nwhen running `cargo nextest bench`.\",\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"slow-timeout\": {\n \"description\": \"Time after which benchmarks are considered slow, plus optional\\ntermination policy. Replaces `slow-timeout` when running\\n`cargo nextest bench`.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/SlowTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"ConfigIdentifier\": {\n \"description\": \"An identifier used in configuration.\\n\\nThe identifier goes through some basic validation:\\n* conversion to NFC\\n* ensuring that it is of the form (XID_Start)(XID_Continue | -)*\\n\\nIdentifiers can also be tool identifiers, which are of the form \\\"@tool:tool-name:identifier\\\".\",\n \"type\": \"string\"\n },\n \"CustomProfileImpl\": {\n \"type\": \"object\",\n \"properties\": {\n \"archive\": {\n \"description\": \"Archive configuration for this profile.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/ArchiveConfig\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"bench\": {\n \"description\": \"Benchmark-specific configuration.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/BenchConfig\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"default-filter\": {\n \"description\": \"The default set of tests run by `cargo nextest run`, as a filterset\\nexpression.\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"fail-fast\": {\n \"description\": \"Controls when to stop running tests after failures.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/MaxFail\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"failure-output\": {\n \"description\": \"When to display output for failed tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/TestOutputDisplay\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"final-status-level\": {\n \"description\": \"Level of status information to display in the final summary.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/FinalStatusLevel\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"flaky-result\": {\n \"description\": \"Whether to treat flaky tests as passing or failing.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/FlakyResult\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"global-timeout\": {\n \"description\": \"A global timeout for the entire test run.\",\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"inherits\": {\n \"description\": \"The profile to inherit settings from.\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"junit\": {\n \"description\": \"JUnit XML output configuration.\",\n \"$ref\": \"#/$defs/JunitImpl\"\n },\n \"leak-timeout\": {\n \"description\": \"Time to wait for child processes to exit after a test completes.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/LeakTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"overrides\": {\n \"description\": \"Per-test setting overrides, evaluated in order.\",\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/DeserializedOverride\"\n }\n },\n \"retries\": {\n \"description\": \"Retry policy for failed tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/RetryPolicy\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"run-extra-args\": {\n \"description\": \"Extra arguments to pass to test binaries.\",\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"default\": null,\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"scripts\": {\n \"description\": \"Profile-specific script bindings (setup and wrapper).\",\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/DeserializedProfileScriptConfig\"\n }\n },\n \"slow-timeout\": {\n \"description\": \"Time after which tests are considered slow, plus optional termination\\npolicy.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/SlowTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"status-level\": {\n \"description\": \"Level of status information to display during test runs.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/StatusLevel\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"success-output\": {\n \"description\": \"When to display output for successful tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/TestOutputDisplay\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"test-threads\": {\n \"description\": \"Number of threads to run tests with.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/TestThreads\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"threads-required\": {\n \"description\": \"Number of threads (slots) each test reserves from the pool.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/ThreadsRequired\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"CustomTestGroup\": {\n \"description\": \"Represents a custom test group.\",\n \"$ref\": \"#/$defs/ConfigIdentifier\"\n },\n \"DeserializedJunitOutput\": {\n \"type\": \"object\",\n \"properties\": {\n \"flaky-fail-status\": {\n \"description\": \"How flaky-fail tests are reported in the JUnit XML report.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/JunitFlakyFailStatus\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"store-failure-output\": {\n \"description\": \"Whether to store failed output for matching tests in the JUnit XML\\nreport.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"store-success-output\": {\n \"description\": \"Whether to store successful output for matching tests in the JUnit XML\\nreport.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"DeserializedOverride\": {\n \"description\": \"Deserialized form of profile overrides before compilation.\",\n \"type\": \"object\",\n \"properties\": {\n \"bench\": {\n \"description\": \"Benchmark-specific overrides for matching tests.\",\n \"$ref\": \"#/$defs/DeserializedOverrideBench\"\n },\n \"default-filter\": {\n \"description\": \"Replaces `default-filter` for matching platforms. Requires `platform`\\nand must not be combined with `filter`.\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"failure-output\": {\n \"description\": \"When to display output for matching failed tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/TestOutputDisplay\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"filter\": {\n \"description\": \"Filterset expression selecting tests this override applies to.\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"flaky-result\": {\n \"description\": \"Whether to treat matching flaky tests as passing or failing.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/FlakyResult\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"junit\": {\n \"description\": \"JUnit XML output settings for matching tests.\",\n \"$ref\": \"#/$defs/DeserializedJunitOutput\"\n },\n \"leak-timeout\": {\n \"description\": \"Leak timeout for matching tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/LeakTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"platform\": {\n \"description\": \"Host and/or target platforms this override applies to.\",\n \"$ref\": \"#/$defs/PlatformStrings\"\n },\n \"priority\": {\n \"description\": \"Priority for matching tests; higher values run sooner.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/TestPriority\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"retries\": {\n \"description\": \"Retry policy for matching tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/RetryPolicy\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"run-extra-args\": {\n \"description\": \"Extra arguments to pass to matching test binaries.\",\n \"type\": [\n \"array\",\n \"null\"\n ],\n \"default\": null,\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"slow-timeout\": {\n \"description\": \"Slow timeout for matching tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/SlowTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"success-output\": {\n \"description\": \"When to display output for matching successful tests.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/TestOutputDisplay\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"test-group\": {\n \"description\": \"Test group to put matching tests in.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/CustomTestGroup\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"threads-required\": {\n \"description\": \"Number of threads each matching test reserves from the pool.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/ThreadsRequired\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"DeserializedOverrideBench\": {\n \"description\": \"Deserialized form of benchmark-specific overrides.\",\n \"type\": \"object\",\n \"properties\": {\n \"slow-timeout\": {\n \"description\": \"Slow timeout for matching benchmarks.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/SlowTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"DeserializedProfileScriptConfig\": {\n \"description\": \"Deserialized form of profile-specific script configuration before compilation.\",\n \"type\": \"object\",\n \"properties\": {\n \"filter\": {\n \"description\": \"Filterset expression selecting tests these scripts apply to.\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"list-wrapper\": {\n \"description\": \"Name of the wrapper script used during test listing.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/ScriptId\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"platform\": {\n \"description\": \"Host and/or target platforms these scripts apply to.\",\n \"$ref\": \"#/$defs/PlatformStrings\"\n },\n \"run-wrapper\": {\n \"description\": \"Name of the wrapper script used during test execution.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/ScriptId\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"setup\": {\n \"description\": \"Names of setup scripts to run (single name or array).\",\n \"default\": [],\n \"oneOf\": [\n {\n \"$ref\": \"#/$defs/ScriptId\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/ScriptId\"\n }\n }\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"ExperimentalDeserialize\": {\n \"oneOf\": [\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"setup-scripts\",\n \"wrapper-scripts\",\n \"benchmarks\"\n ]\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"benchmarks\": {\n \"type\": \"boolean\"\n },\n \"setup-scripts\": {\n \"type\": \"boolean\"\n },\n \"wrapper-scripts\": {\n \"type\": \"boolean\"\n }\n },\n \"additionalProperties\": true\n }\n ]\n },\n \"FinalStatusLevel\": {\n \"description\": \"Level of status information to display in the final summary.\\n\\nStatus levels are incremental. This differs from `status-level` in two\\nways:\\n\\n* It has a \\\"flaky\\\" test indicator distinct from \\\"retry\\\" (though \\\"retry\\\"\\n works as an alias).\\n* It has a different ordering: skipped tests are prioritized over passing\\n ones.\",\n \"oneOf\": [\n {\n \"description\": \"No output.\",\n \"type\": \"string\",\n \"const\": \"none\"\n },\n {\n \"description\": \"Only output test failures.\",\n \"type\": \"string\",\n \"const\": \"fail\"\n },\n {\n \"description\": \"Output flaky tests; includes `fail`. Accepts `\\\"retry\\\"` as an alias.\",\n \"type\": \"string\",\n \"const\": \"flaky\"\n },\n {\n \"description\": \"Output slow tests; includes `flaky`.\",\n \"type\": \"string\",\n \"const\": \"slow\"\n },\n {\n \"description\": \"Output skipped tests; includes `slow`.\",\n \"type\": \"string\",\n \"const\": \"skip\"\n },\n {\n \"description\": \"Output leaky tests; includes `skip`.\",\n \"type\": \"string\",\n \"const\": \"leak\"\n },\n {\n \"description\": \"Output passing tests; includes `leak`.\",\n \"type\": \"string\",\n \"const\": \"pass\"\n },\n {\n \"description\": \"Equivalent to `\\\"pass\\\"` today; reserved for future expansion.\",\n \"type\": \"string\",\n \"const\": \"all\"\n }\n ]\n },\n \"FlakyResult\": {\n \"description\": \"Controls whether a flaky test is treated as a pass or a failure.\",\n \"oneOf\": [\n {\n \"description\": \"The test is marked as failed.\",\n \"type\": \"string\",\n \"const\": \"fail\"\n },\n {\n \"description\": \"The test is marked as passed.\",\n \"type\": \"string\",\n \"const\": \"pass\"\n }\n ]\n },\n \"JunitFlakyFailStatus\": {\n \"description\": \"Controls how flaky-fail tests are reported in JUnit XML output.\\n\\nFlaky-fail tests are tests that eventually passed on retry but are configured\\nwith `flaky-result = \\\"fail\\\"`. This setting controls whether they appear as\\nfailures or successes in the JUnit report.\",\n \"oneOf\": [\n {\n \"description\": \"Report flaky-fail tests as failures with `<failure>` and\\n`<flakyFailure>` elements.\",\n \"type\": \"string\",\n \"const\": \"failure\"\n },\n {\n \"description\": \"Report flaky-fail tests as successes, identical to flaky-pass tests.\",\n \"type\": \"string\",\n \"const\": \"success\"\n }\n ]\n },\n \"JunitImpl\": {\n \"type\": \"object\",\n \"properties\": {\n \"flaky-fail-status\": {\n \"description\": \"How flaky-fail tests are reported in the JUnit XML report.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/JunitFlakyFailStatus\"\n },\n {\n \"type\": \"null\"\n }\n ],\n \"default\": null\n },\n \"path\": {\n \"description\": \"Path to write the JUnit XML report to. If unset, JUnit reporting is\\ndisabled.\",\n \"type\": \"string\",\n \"default\": null\n },\n \"report-name\": {\n \"description\": \"Name for the JUnit XML report.\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"store-failure-output\": {\n \"description\": \"Whether to store failed test output in the JUnit XML report.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"default\": null\n },\n \"store-success-output\": {\n \"description\": \"Whether to store successful test output in the JUnit XML report.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"default\": null\n }\n },\n \"additionalProperties\": false\n },\n \"LeakTimeout\": {\n \"title\": \"LeakTimeout\",\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"period\": {\n \"type\": \"string\"\n },\n \"result\": {\n \"$ref\": \"#/$defs/LeakTimeoutResult\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"period\"\n ]\n }\n ]\n },\n \"LeakTimeoutResult\": {\n \"description\": \"Whether to mark a test as passed or failed when the leak timeout elapses.\",\n \"oneOf\": [\n {\n \"description\": \"Mark the test as failed.\",\n \"type\": \"string\",\n \"const\": \"fail\"\n },\n {\n \"description\": \"Mark the test as passed.\",\n \"type\": \"string\",\n \"const\": \"pass\"\n }\n ]\n },\n \"MaxFail\": {\n \"oneOf\": [\n {\n \"type\": \"boolean\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"max-fail\": {\n \"oneOf\": [\n {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n {\n \"type\": \"string\",\n \"enum\": [\n \"all\"\n ]\n }\n ]\n },\n \"terminate\": {\n \"$ref\": \"#/$defs/TerminateMode\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"max-fail\"\n ]\n }\n ]\n },\n \"NextestVersionDeserialize\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"recommended\": {\n \"type\": \"string\"\n },\n \"required\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n }\n ]\n },\n \"PlatformStrings\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"host\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n },\n \"target\": {\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"additionalProperties\": false\n }\n ]\n },\n \"RetryPolicy\": {\n \"title\": \"RetryPolicy\",\n \"oneOf\": [\n {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"backoff\": {\n \"type\": \"string\",\n \"const\": \"fixed\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"delay\": {\n \"type\": \"string\"\n },\n \"jitter\": {\n \"type\": \"boolean\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"backoff\",\n \"count\"\n ]\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"backoff\": {\n \"type\": \"string\",\n \"const\": \"exponential\"\n },\n \"count\": {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n \"delay\": {\n \"type\": \"string\"\n },\n \"jitter\": {\n \"type\": \"boolean\"\n },\n \"max-delay\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"backoff\",\n \"count\",\n \"delay\"\n ]\n }\n ]\n },\n \"ScriptCommand\": {\n \"title\": \"ScriptCommand\",\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"minItems\": 1\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"command-line\": {\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"minItems\": 1\n }\n ]\n },\n \"env\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"string\"\n }\n },\n \"relative-to\": {\n \"$ref\": \"#/$defs/ScriptCommandRelativeTo\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"command-line\"\n ]\n }\n ]\n },\n \"ScriptCommandRelativeTo\": {\n \"description\": \"Base directory a relative script program is resolved against.\\n\\nIf specified, the program is joined with the provided path.\",\n \"oneOf\": [\n {\n \"description\": \"Use the program path as-is, without joining.\",\n \"type\": \"string\",\n \"const\": \"none\"\n },\n {\n \"description\": \"Resolve the program against the workspace root.\",\n \"type\": \"string\",\n \"const\": \"workspace-root\"\n },\n {\n \"description\": \"Resolve the program against the target directory.\",\n \"type\": \"string\",\n \"const\": \"target\"\n }\n ]\n },\n \"ScriptConfig\": {\n \"description\": \"Setup and wrapper scripts defined in nextest configuration.\",\n \"type\": \"object\",\n \"properties\": {\n \"setup\": {\n \"description\": \"Setup scripts, keyed by script name.\",\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/SetupScriptConfig\"\n }\n },\n \"wrapper\": {\n \"description\": \"Wrapper scripts, keyed by script name.\",\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/WrapperScriptConfig\"\n }\n }\n },\n \"additionalProperties\": false\n },\n \"ScriptId\": {\n \"description\": \"The name of a configuration script.\",\n \"type\": \"string\"\n },\n \"SetupScriptConfig\": {\n \"description\": \"Deserialized form of setup script configuration before compilation.\\n\\nThis is defined as a top-level element.\",\n \"type\": \"object\",\n \"properties\": {\n \"capture-stderr\": {\n \"description\": \"Whether to capture stderr from this setup script.\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"capture-stdout\": {\n \"description\": \"Whether to capture stdout from this setup script.\",\n \"type\": \"boolean\",\n \"default\": false\n },\n \"command\": {\n \"description\": \"The command to run for this setup script.\",\n \"$ref\": \"#/$defs/ScriptCommand\"\n },\n \"junit\": {\n \"description\": \"JUnit XML output settings for this setup script.\",\n \"$ref\": \"#/$defs/SetupScriptJunitConfig\"\n },\n \"leak-timeout\": {\n \"description\": \"Leak-timeout configuration for this setup script.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/LeakTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"slow-timeout\": {\n \"description\": \"Slow-timeout configuration for this setup script.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/SlowTimeout\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"command\"\n ]\n },\n \"SetupScriptJunitConfig\": {\n \"description\": \"JUnit XML output settings for a setup script.\",\n \"type\": \"object\",\n \"properties\": {\n \"store-failure-output\": {\n \"description\": \"Whether to store this setup script\'s output on failure in the JUnit XML\\nreport. Defaults to true.\",\n \"type\": \"boolean\",\n \"default\": true\n },\n \"store-success-output\": {\n \"description\": \"Whether to store this setup script\'s output on success in the JUnit XML\\nreport. Defaults to true.\",\n \"type\": \"boolean\",\n \"default\": true\n }\n },\n \"additionalProperties\": false\n },\n \"SlowTimeout\": {\n \"title\": \"SlowTimeout\",\n \"oneOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"grace-period\": {\n \"type\": \"string\"\n },\n \"on-timeout\": {\n \"$ref\": \"#/$defs/SlowTimeoutResult\"\n },\n \"period\": {\n \"type\": \"string\"\n },\n \"terminate-after\": {\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"minimum\": 1\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"period\"\n ]\n }\n ]\n },\n \"SlowTimeoutResult\": {\n \"description\": \"The result of controlling slow timeout behavior.\\n\\nIn most situations a timed out test should be marked failing. However, there are certain\\nclasses of tests which are expected to run indefinitely long, like fuzzing, which explores a\\nhuge state space. For these tests it\'s nice to be able to treat a timeout as a success since\\nthey generally check for invariants and other properties of the code under test during their\\nexecution. A timeout in this context doesn\'t mean that there are no failing inputs, it just\\nmeans that they weren\'t found up until that moment, which is still valuable information.\",\n \"oneOf\": [\n {\n \"description\": \"The test is marked as failed.\",\n \"type\": \"string\",\n \"const\": \"fail\"\n },\n {\n \"description\": \"The test is marked as passed.\",\n \"type\": \"string\",\n \"const\": \"pass\"\n }\n ]\n },\n \"StatusLevel\": {\n \"description\": \"Level of status information to display during test runs.\\n\\nStatus levels are incremental: each level causes all the statuses listed\\nabove it to be output. For example, `slow` implies `retry` and `fail`.\",\n \"oneOf\": [\n {\n \"description\": \"No output.\",\n \"type\": \"string\",\n \"const\": \"none\"\n },\n {\n \"description\": \"Only output test failures.\",\n \"type\": \"string\",\n \"const\": \"fail\"\n },\n {\n \"description\": \"Output test retries; includes `fail`.\",\n \"type\": \"string\",\n \"const\": \"retry\"\n },\n {\n \"description\": \"Output slow tests; includes `retry`.\",\n \"type\": \"string\",\n \"const\": \"slow\"\n },\n {\n \"description\": \"Output leaky tests; includes `slow`.\",\n \"type\": \"string\",\n \"const\": \"leak\"\n },\n {\n \"description\": \"Output passing tests; includes `leak`.\",\n \"type\": \"string\",\n \"const\": \"pass\"\n },\n {\n \"description\": \"Output skipped tests; includes `pass`.\",\n \"type\": \"string\",\n \"const\": \"skip\"\n },\n {\n \"description\": \"Equivalent to `\\\"skip\\\"` today; reserved for future expansion.\",\n \"type\": \"string\",\n \"const\": \"all\"\n }\n ]\n },\n \"StoreConfigImpl\": {\n \"type\": \"object\",\n \"properties\": {\n \"dir\": {\n \"description\": \"Directory where nextest stores its data.\",\n \"type\": [\n \"string\",\n \"null\"\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"TerminateMode\": {\n \"description\": \"Mode for terminating running tests when max-fail is exceeded.\",\n \"oneOf\": [\n {\n \"description\": \"Wait for running tests to complete naturally.\",\n \"type\": \"string\",\n \"const\": \"wait\"\n },\n {\n \"description\": \"Send termination signals to running tests immediately.\",\n \"type\": \"string\",\n \"const\": \"immediate\"\n }\n ]\n },\n \"TestGroupConfig\": {\n \"description\": \"Configuration for a single test group.\",\n \"type\": \"object\",\n \"properties\": {\n \"max-threads\": {\n \"description\": \"Maximum number of threads this test group may use concurrently.\",\n \"$ref\": \"#/$defs/TestThreads\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"max-threads\"\n ]\n },\n \"TestOutputDisplay\": {\n \"description\": \"When to display test output in the reporter.\",\n \"oneOf\": [\n {\n \"description\": \"Shows captured output as soon as the test completes.\",\n \"type\": \"string\",\n \"const\": \"immediate\"\n },\n {\n \"description\": \"Shows captured output when the test completes and again at the end of\\nthe run.\",\n \"type\": \"string\",\n \"const\": \"immediate-final\"\n },\n {\n \"description\": \"Shows captured output only at the end of the run.\",\n \"type\": \"string\",\n \"const\": \"final\"\n },\n {\n \"description\": \"Never shows captured output.\",\n \"type\": \"string\",\n \"const\": \"never\"\n }\n ]\n },\n \"TestPriority\": {\n \"description\": \"A test priority between -100 and 100, inclusive. Higher values run sooner.\",\n \"type\": \"integer\",\n \"format\": \"int8\",\n \"maximum\": 100,\n \"minimum\": -100\n },\n \"TestThreads\": {\n \"oneOf\": [\n {\n \"type\": \"integer\",\n \"not\": {\n \"const\": 0\n }\n },\n {\n \"type\": \"string\",\n \"enum\": [\n \"num-cpus\"\n ]\n }\n ]\n },\n \"ThreadsRequired\": {\n \"oneOf\": [\n {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n {\n \"type\": \"string\",\n \"enum\": [\n \"num-cpus\",\n \"num-test-threads\"\n ]\n }\n ]\n },\n \"WrapperScriptConfig\": {\n \"description\": \"Deserialized form of wrapper script configuration before compilation.\\n\\nThis is defined as a top-level element.\",\n \"type\": \"object\",\n \"properties\": {\n \"command\": {\n \"description\": \"The command to run as the wrapper.\",\n \"$ref\": \"#/$defs/ScriptCommand\"\n },\n \"target-runner\": {\n \"description\": \"How this wrapper composes with a configured target runner.\",\n \"$ref\": \"#/$defs/WrapperScriptTargetRunner\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"command\"\n ]\n },\n \"WrapperScriptTargetRunner\": {\n \"description\": \"How a wrapper script composes with a configured target runner.\",\n \"oneOf\": [\n {\n \"description\": \"The target runner is ignored.\",\n \"type\": \"string\",\n \"const\": \"ignore\"\n },\n {\n \"description\": \"When a target runner is configured, it replaces the wrapper; otherwise\\nthe wrapper runs as usual.\",\n \"type\": \"string\",\n \"const\": \"overrides-wrapper\"\n },\n {\n \"description\": \"The target runner runs within the wrapper script. The command line used\\nis `<wrapper> <target-runner> <test-binary> <args>`.\",\n \"type\": \"string\",\n \"const\": \"within-wrapper\"\n },\n {\n \"description\": \"The target runner runs around the wrapper script. The command line used\\nis `<target-runner> <wrapper> <test-binary> <args>`.\",\n \"type\": \"string\",\n \"const\": \"around-wrapper\"\n }\n ]\n }\n }\n}\n"

The pregenerated JSON Schema for .config/nextest.toml.

The schema is checked into the repository at nextest-runner/jsonschemas/repo-config.json. (If you’re working within the nextest repository, regenerate the schema with just generate-schemas.)

Source

pub const ENVIRONMENT_PREFIX: &'static str = "NEXTEST"

Environment configuration uses this prefix, plus a _.

Source

pub const DEFAULT_PROFILE: &'static str = "default"

The name of the default profile.

Source

pub const DEFAULT_MIRI_PROFILE: &'static str = "default-miri"

The name of the default profile used for miri.

Source

pub const DEFAULT_PROFILES: &'static [&'static str]

A list containing the names of the Nextest defined reserved profile names.

Source

pub fn from_sources<'a, I>( workspace_root: impl Into<Utf8PathBuf>, pcx: &ParseContext<'_>, config_file: Option<&Utf8Path>, tool_config_files: impl IntoIterator<IntoIter = I>, experimental: &BTreeSet<ConfigExperimental>, ) -> Result<Self, ConfigParseError>

Reads the nextest config from the given file, or if not specified from .config/nextest.toml in the workspace root.

tool_config_files are lower priority than config_file but higher priority than the default config. Files in tool_config_files that come earlier are higher priority than those that come later.

If no config files are specified and this file doesn’t have .config/nextest.toml, uses the default config options.

Source

pub fn from_sources_with_warnings<'a, I>( workspace_root: impl Into<Utf8PathBuf>, pcx: &ParseContext<'_>, config_file: Option<&Utf8Path>, tool_config_files: impl IntoIterator<IntoIter = I>, experimental: &BTreeSet<ConfigExperimental>, warnings: &mut impl ConfigWarnings, ) -> Result<Self, ConfigParseError>

Load configuration from the given sources with custom warning handling.

Source

pub fn profile( &self, name: impl AsRef<str>, ) -> Result<EarlyProfile<'_>, ProfileNotFound>

Returns the profile with the given name, or an error if a profile was specified but not found.

Trait Implementations§

Source§

impl Clone for NextestConfig

Source§

fn clone(&self) -> NextestConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for NextestConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

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

Source§

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 T
where U: TryFrom<T>,

Source§

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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