Skip to main content

UserConfig

Struct UserConfig 

Source
pub struct UserConfig {
    pub experimental: BTreeSet<UserConfigExperimental>,
    pub ui: UiConfig,
    pub record: RecordConfig,
}
Expand description

User configuration after custom settings and overrides have been applied.

Fields§

§experimental: BTreeSet<UserConfigExperimental>

Experimental features enabled (from config and environment variables).

§ui: UiConfig

Resolved UI configuration.

§record: RecordConfig

Resolved record configuration.

Implementations§

Source§

impl UserConfig

Source

pub const SCHEMA: &'static str = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"DeserializedUserConfig\",\n \"description\": \"Per-user nextest configuration.\\n\\nStores personal preferences such as UI defaults and recording behavior.\\nThis is distinct from the repository config (`.config/nextest.toml`),\\nwhich controls test execution.\\n\\nSee [_User configuration reference_](https://nexte.st/docs/user-config/reference)\\nfor details on each setting.\",\n \"type\": \"object\",\n \"properties\": {\n \"experimental\": {\n \"description\": \"Toggles for experimental, non-stable features.\\n\\n```toml\\n[experimental]\\nrecord = true\\n```\",\n \"$ref\": \"#/$defs/ExperimentalConfig\"\n },\n \"overrides\": {\n \"description\": \"Platform-specific overrides applied on top of the base configuration.\\n\\nEach entry specifies a `platform` filter and any number of settings to\\nsubstitute when that filter matches. For each setting, the first\\nmatching override wins; the base configuration is used if no override\\nmatches.\",\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/DeserializedOverride\"\n }\n },\n \"record\": {\n \"description\": \"Retention settings for the record-replay-rerun feature.\",\n \"$ref\": \"#/$defs/DeserializedRecordConfig\"\n },\n \"ui\": {\n \"description\": \"Display, progress, and pager settings.\",\n \"$ref\": \"#/$defs/DeserializedUiConfig\"\n }\n },\n \"additionalProperties\": false,\n \"x-tombi-toml-version\": \"v1.1.0\",\n \"$defs\": {\n \"CommandNameAndArgs\": {\n \"title\": \"CommandNameAndArgs\",\n \"oneOf\": [\n {\n \"type\": \"string\",\n \"minLength\": 1,\n \"pattern\": \"\\\\S\"\n },\n {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"minItems\": 1\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"command\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"minItems\": 1\n },\n \"env\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"type\": \"string\"\n }\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"command\"\n ]\n }\n ]\n },\n \"DeserializedOverride\": {\n \"description\": \"A single platform-specific override entry.\",\n \"type\": \"object\",\n \"properties\": {\n \"platform\": {\n \"description\": \"Target-spec expression selecting which platforms this override applies\\nto.\\n\\nAccepts a target triple (e.g. `x86_64-unknown-linux-gnu`) or a `cfg()`\\nexpression (e.g. `cfg(windows)`, `cfg(target_os = \\\"macos\\\")`). Matched\\nagainst the platform nextest was built for.\",\n \"type\": \"string\"\n },\n \"record\": {\n \"description\": \"Record retention settings to substitute on matching platforms.\",\n \"$ref\": \"#/$defs/DeserializedRecordOverrideData\"\n },\n \"ui\": {\n \"description\": \"UI settings to substitute on matching platforms.\",\n \"$ref\": \"#/$defs/DeserializedUiOverrideData\"\n }\n },\n \"additionalProperties\": false,\n \"required\": [\n \"platform\"\n ]\n },\n \"DeserializedRecordConfig\": {\n \"description\": \"Retention policy for recorded test runs.\\n\\nRecording only happens when the `record` experimental feature is enabled\\n_and_ `enabled` here is true. The least-recently-used runs are evicted to\\nkeep within `max-records`, `max-total-size`, and `max-age`.\",\n \"type\": \"object\",\n \"properties\": {\n \"enabled\": {\n \"description\": \"Whether to record test runs.\\n\\nSet to false to temporarily disable recording without removing the rest\\nof the configuration. Has no effect unless the `record` experimental\\nfeature is also enabled.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"default\": null\n },\n \"max-age\": {\n \"description\": \"Maximum idle time before a recorded run is evicted (e.g. `\\\"30d\\\"`).\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"max-output-size\": {\n \"description\": \"Maximum size of a single captured stdout or stderr stream before it is\\ntruncated (e.g. `\\\"10MB\\\"`).\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"max-records\": {\n \"description\": \"Maximum number of recorded runs to retain.\",\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"format\": \"uint\",\n \"default\": null,\n \"minimum\": 0\n },\n \"max-total-size\": {\n \"description\": \"Maximum combined size of all recorded runs (e.g. `\\\"1GB\\\"`).\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n }\n },\n \"additionalProperties\": false\n },\n \"DeserializedRecordOverrideData\": {\n \"description\": \"Per-platform substitutions for `[record]` settings.\\n\\nEach field has the same meaning as in the `[record]` table. Only the\\nfields actually set here are substituted on matching platforms.\",\n \"type\": \"object\",\n \"properties\": {\n \"enabled\": {\n \"description\": \"Whether to record test runs.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ],\n \"default\": null\n },\n \"max-age\": {\n \"description\": \"Maximum idle time before a recorded run is evicted (e.g. `\\\"30d\\\"`).\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"max-output-size\": {\n \"description\": \"Maximum size of a single captured stdout or stderr stream before it is\\ntruncated (e.g. `\\\"10MB\\\"`).\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n },\n \"max-records\": {\n \"description\": \"Maximum number of recorded runs to retain.\",\n \"type\": [\n \"integer\",\n \"null\"\n ],\n \"format\": \"uint\",\n \"default\": null,\n \"minimum\": 0\n },\n \"max-total-size\": {\n \"description\": \"Maximum combined size of all recorded runs (e.g. `\\\"1GB\\\"`).\",\n \"type\": [\n \"string\",\n \"null\"\n ],\n \"default\": null\n }\n },\n \"additionalProperties\": false\n },\n \"DeserializedStreampagerConfig\": {\n \"description\": \"Settings for nextest\'s built-in pager (active when `pager = \\\":builtin\\\"`).\",\n \"type\": \"object\",\n \"properties\": {\n \"interface\": {\n \"description\": \"How the pager uses the alternate screen and when it exits.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/StreampagerInterface\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"show-ruler\": {\n \"description\": \"Shows a ruler at the bottom of the pager.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"wrapping\": {\n \"description\": \"How long lines are wrapped.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/StreampagerWrapping\"\n },\n {\n \"type\": \"null\"\n }\n ]\n }\n },\n \"additionalProperties\": false\n },\n \"DeserializedUiConfig\": {\n \"description\": \"Display, progress, and pager settings.\",\n \"type\": \"object\",\n \"properties\": {\n \"input-handler\": {\n \"description\": \"Enables the interactive keyboard input handler (e.g. `t` to dump test\\nstatus, `Enter` to print a summary line).\",\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"max-progress-running\": {\n \"description\": \"Maximum number of running tests to list in the progress bar.\\n\\nAccepts a non-negative integer, or `\\\"infinite\\\"` for no limit. When the\\nnumber of running tests exceeds this, the remainder is collapsed into a\\nsummary line.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/MaxProgressRunning\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"output-indent\": {\n \"description\": \"Indents captured test output for visual clarity.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"pager\": {\n \"description\": \"Pager command to use for output that benefits from scrolling. Use\\n`\\\":builtin\\\"` to select nextest\'s built-in pager.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/PagerSetting\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"paginate\": {\n \"description\": \"When to send output through the pager.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/PaginateSetting\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"show-progress\": {\n \"description\": \"Style of progress display shown during test runs.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/UiShowProgress\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"streampager\": {\n \"description\": \"Settings for the built-in pager (active when `pager = \\\":builtin\\\"`).\",\n \"$ref\": \"#/$defs/DeserializedStreampagerConfig\"\n }\n },\n \"additionalProperties\": false\n },\n \"DeserializedUiOverrideData\": {\n \"description\": \"Per-platform substitutions for `[ui]` settings.\\n\\nEach field has the same meaning as in the `[ui]` table. Only the fields\\nactually set here are substituted on matching platforms.\",\n \"type\": \"object\",\n \"properties\": {\n \"input-handler\": {\n \"description\": \"Enables the interactive keyboard input handler.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"max-progress-running\": {\n \"description\": \"Maximum number of running tests to list in the progress bar.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/MaxProgressRunning\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"output-indent\": {\n \"description\": \"Indents captured test output for visual clarity.\",\n \"type\": [\n \"boolean\",\n \"null\"\n ]\n },\n \"pager\": {\n \"description\": \"Pager command to use for output that benefits from scrolling.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/PagerSetting\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"paginate\": {\n \"description\": \"When to send output through the pager.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/PaginateSetting\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"show-progress\": {\n \"description\": \"Style of progress display shown during test runs.\",\n \"anyOf\": [\n {\n \"$ref\": \"#/$defs/UiShowProgress\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"streampager\": {\n \"description\": \"Settings for the built-in pager (active when `pager = \\\":builtin\\\"`).\",\n \"$ref\": \"#/$defs/DeserializedStreampagerConfig\"\n }\n },\n \"additionalProperties\": false\n },\n \"ExperimentalConfig\": {\n \"description\": \"User-level experimental features.\\n\\nConfigured in the `[experimental]` table of the user config file:\\n\\n```toml\\n[experimental]\\nrecord = true\\n```\\n\\nUnknown features in this table produce a warning rather than an error, so\\nolder nextest binaries can load configs written for newer ones.\",\n \"type\": \"object\",\n \"properties\": {\n \"record\": {\n \"description\": \"Enables the record-replay-rerun feature, which stores test run results\\non disk so they can be replayed or selectively rerun later.\",\n \"type\": \"boolean\",\n \"default\": false\n }\n }\n },\n \"MaxProgressRunning\": {\n \"title\": \"MaxProgressRunning\",\n \"description\": \"Maximum number of running tests to display: a non-negative integer, or \\\"infinite\\\" for no limit.\",\n \"oneOf\": [\n {\n \"type\": \"integer\",\n \"minimum\": 0\n },\n {\n \"type\": \"string\",\n \"enum\": [\n \"infinite\"\n ]\n }\n ]\n },\n \"PagerSetting\": {\n \"title\": \"PagerSetting\",\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"const\": \":builtin\"\n },\n {\n \"$ref\": \"#/$defs/CommandNameAndArgs\"\n }\n ]\n },\n \"PaginateSetting\": {\n \"description\": \"When to send output through the pager.\",\n \"oneOf\": [\n {\n \"description\": \"Pages output from supported commands when stdout is a terminal.\",\n \"type\": \"string\",\n \"const\": \"auto\"\n },\n {\n \"description\": \"Disables pagination entirely.\",\n \"type\": \"string\",\n \"const\": \"never\"\n }\n ]\n },\n \"StreampagerInterface\": {\n \"description\": \"How the built-in pager uses the alternate screen and when it exits.\",\n \"oneOf\": [\n {\n \"description\": \"Exits immediately if the output fits on one page; otherwise switches\\nto full-screen and clears on exit.\",\n \"type\": \"string\",\n \"const\": \"quit-if-one-page\"\n },\n {\n \"description\": \"Always uses full-screen mode and clears the screen on exit.\",\n \"type\": \"string\",\n \"const\": \"full-screen-clear-output\"\n },\n {\n \"description\": \"Waits briefly before entering full-screen mode; clears on exit only if\\nit switched to full-screen.\",\n \"type\": \"string\",\n \"const\": \"quit-quickly-or-clear-output\"\n }\n ]\n },\n \"StreampagerWrapping\": {\n \"description\": \"How long lines are wrapped in the built-in pager.\",\n \"oneOf\": [\n {\n \"description\": \"Disables wrapping; long lines extend off-screen and can be scrolled\\nhorizontally.\",\n \"type\": \"string\",\n \"const\": \"none\"\n },\n {\n \"description\": \"Wraps at word boundaries.\",\n \"type\": \"string\",\n \"const\": \"word\"\n },\n {\n \"description\": \"Wraps at any character (grapheme) boundary.\",\n \"type\": \"string\",\n \"const\": \"anywhere\"\n }\n ]\n },\n \"UiShowProgress\": {\n \"description\": \"Style of progress display shown during test runs.\",\n \"oneOf\": [\n {\n \"description\": \"Picks a display based on terminal capabilities: a progress bar in\\ninteractive terminals, a counter otherwise.\",\n \"type\": \"string\",\n \"const\": \"auto\"\n },\n {\n \"description\": \"Disables progress display entirely.\",\n \"type\": \"string\",\n \"const\": \"none\"\n },\n {\n \"description\": \"Shows a progress bar listing the currently running tests.\",\n \"type\": \"string\",\n \"const\": \"bar\"\n },\n {\n \"description\": \"Shows a single-line counter (e.g. `(1/10)`).\",\n \"type\": \"string\",\n \"const\": \"counter\"\n },\n {\n \"description\": \"Like `bar` in interactive terminals, but additionally hides successful\\ntest output (sets `status-level` to `slow` and `final-status-level` to\\n`none`). Falls back to `auto` behavior in non-interactive contexts\\n(e.g. piped output, CI).\",\n \"type\": \"string\",\n \"const\": \"only\"\n }\n ]\n }\n }\n}\n"

The pregenerated JSON Schema for config.toml in the user config directory.

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

Source

pub const DEFAULT_CONFIG: &'static str = "# This is the default user config used by nextest. It is embedded in the binary\n# at build time. It may be used as a template for ~/.config/nextest/config.toml.\n#\n# For documentation on these settings, see:\n# https://nexte.st/docs/user-config/reference\n\n[ui]\n# How to show progress during test runs.\n# Valid values: \"auto\", \"none\", \"bar\", \"counter\", \"only\"\nshow-progress = \"auto\"\n\n# Maximum running tests to display in the progress bar.\n# Valid values: an integer, or \"infinite\" for unlimited.\nmax-progress-running = 8\n\n# Whether to enable the input handler for keyboard shortcuts during test runs.\ninput-handler = true\n\n# Whether to indent captured test output for visual clarity.\noutput-indent = true\n\n# Pager for supported command output.\n#\n# Accepts a command string (\"less -FRX\"), an array ([\"less\", \"-FRX\"]),\n# a table ({ command = [\"less\", \"-FRX\"], env = { LESSCHARSET = \"utf-8\" } }),\n# or \":builtin\" to use the builtin pager.\npager = { command = [\"less\", \"-FRX\"], env = { LESSCHARSET = \"utf-8\" } }\n\n# When to paginate output.\n# Valid values: \"auto\", \"never\"\npaginate = \"auto\"\n\n# Configuration for the builtin streampager (used when pager = \":builtin\").\n[ui.streampager]\n# Interface mode controlling alternate screen behavior.\n# Valid values: \"quit-if-one-page\", \"full-screen-clear-output\", \"quit-quickly-or-clear-output\"\ninterface = \"quit-if-one-page\"\n# Text wrapping mode.\n# Valid values: \"none\", \"word\", \"anywhere\"\nwrapping = \"word\"\n# Whether to show a ruler at the bottom.\nshow-ruler = true\n\n# Record retention settings (for experimental record-replay feature).\n[record]\n# Whether recording is enabled.\n# Recording only occurs when the `record` experimental feature is enabled AND\n# this is set to true.\nenabled = false\n# Maximum number of recorded runs to keep.\nmax-records = 100\n# Maximum total size of all recorded runs.\nmax-total-size = \"1GB\"\n# Maximum age of recorded runs.\nmax-age = \"30d\"\n# Maximum size of a single output (stdout/stderr) before truncation.\nmax-output-size = \"10MB\"\n\n# Windows uses the builtin pager by default because external pagers are\n# unreliable on Windows.\n[[overrides]]\nplatform = \"cfg(windows)\"\nui.pager = \":builtin\"\n"

The embedded default user config TOML.

User-specific configuration is layered on top of this default config.

Source

pub fn load(location: UserConfigLocation<'_>) -> Result<Self, UserConfigError>

Loads and resolves user configuration.

Platform overrides in the user config are evaluated against the build target of the nextest binary (via Platform::build_target), not against the host platform reported by rustc -vV. User config expresses per-user preferences for the running nextest binary, so the binary’s build target is the right thing to match against — and this keeps resolution consistent across normal runs, archive replay, and commands that don’t otherwise need to detect a host platform.

Source

pub fn is_experimental_enabled(&self, feature: UserConfigExperimental) -> bool

Returns true if the specified experimental feature is enabled.

Trait Implementations§

Source§

impl Clone for UserConfig

Source§

fn clone(&self) -> UserConfig

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 UserConfig

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