Enum DistError

Source
pub enum DistError {
Show 77 variants Io(Error), Asset(AxoassetError), Cmd(AxoprocessError), Gazenot(GazenotError), Project(ProjectError), FromUtf8Error(FromUtf8Error), Goblin(Error), FromPathBufError(FromPathBufError), DialoguerError(Error), AxotagError(TagError), ParseIntError(ParseIntError), TripleError(ParseError), Jinja { source: String, span: Option<SourceSpan>, backtrace: JinjaErrorWithBacktrace, }, Wix { msi: String, details: Error, }, WixInit { package: String, details: Error, }, CargoTomlParse { manifest_path: Utf8PathBuf, cause: Error, }, NoUpdateVersion { project_version: Version, running_version: Version, }, CantEnableGithubUrlInconsistent { inner: AxoprojectError, }, CantEnableGithubNoUrl { manifest_list: String, }, CantEnableGithubUrlNotGithub { inner: AxoprojectError, }, ScopeMustBeLowercase { scope: String, }, InstallPathInvalid { path: String, }, InstallPathEnvSlash { path: String, }, InstallPathHomeSubdir { path: String, }, PreciseImpossible { packages: Vec<Utf8PathBuf>, }, MismatchedTaps { packages: Vec<Utf8PathBuf>, }, MismatchedPublishers { packages: Vec<Utf8PathBuf>, }, MismatchedPrereleases, NothingToRelease { help: String, }, TooManyUnrelatedApps { help: String, }, CheckFileMismatch { file: SourceFile, diff: String, }, ContradictoryGenerateModes { generate_mode: GenerateMode, }, MultiPackage { artifact_name: ArtifactId, spec1: String, spec2: String, }, NoPackage { artifact_name: ArtifactId, }, MissingWixGuids { manifest_path: Utf8PathBuf, keys: &'static [&'static str], }, UnrecognizedJobStyle { style: String, }, UnrecognizedHostingStyle { style: String, }, NoGitHubHosting {}, UnrecognizedCiStyle { style: String, }, UnrecognizedLibraryStyle { style: String, }, LinkageCheckInvalidOS { host: String, target: TripleName, }, LinkageCheckUnsupportedBinary, EnvParseError { line: String, }, GitArchiveError {}, GitSubmoduleCommitError { path: String, }, ToolMissing { tool: String, }, EnvToolsMissing { tools: Vec<String>, }, NoAxoupdaterForTarget { target: String, }, AxoupdaterReleaseCheckFailed {}, UnrecognizedCompression { extension: String, }, MissingBinaries { pkg_name: String, bin_name: String, }, UpdateFailed {}, UpdateNotInWorkspace { cause: ProjectError, }, IncompatibleInstallPathConfiguration, CliMissingTargets { host_target: TripleName, }, NeedsInit, MismatchedDistVersion { config_version: String, running_version: String, }, FailedCargoVersion, GithubRepoPairParse { pair: String, }, GithubUnknownPermission { levels: Vec<String>, }, UnrecognizedTarget { target: TripleName, }, EmptyInstaller {}, GithubBuildSetupNotFound { details: AxoassetError, }, GithubBuildSetupParse { details: AxoassetError, }, GithubBuildSetupNotValid { file_path: Utf8PathBuf, message: String, }, UnusedMetadata { manifest_path: Utf8PathBuf, dist_manifest_path: Utf8PathBuf, }, SusBuildCommand { manifest: Utf8PathBuf, command: String, }, NoDistScript { manifest: Utf8PathBuf, }, UnsupportedCrossCompile { host: Triple, target: Triple, details: String, }, CannotDoCargoAuditableAndCrossCompile { host: Triple, target: Triple, }, CargoOnlyBuildOptions { options: Vec<String>, }, NoBuildCommand { manifest: Utf8PathBuf, }, UnexpectedBuildCommand { manifest: Utf8PathBuf, }, CertificateDecodeError {}, MacPkgConfigMissing {}, MacPkgBundleIdentifierMissing {}, AxoupdaterTooOld { package_name: String, source_name: String, minimum: Version, your_version: Version, },
}
Expand description

Errors dist can have

Variants§

§

Io(Error)

random i/o error

§

Asset(AxoassetError)

random axoasset error

§

Cmd(AxoprocessError)

random axoprocess error

§

Gazenot(GazenotError)

random gazenot error

§

Project(ProjectError)

random gazenot error

§

FromUtf8Error(FromUtf8Error)

random string error

§

Goblin(Error)

random i/o error

§

FromPathBufError(FromPathBufError)

random camino conversion error

§

DialoguerError(Error)

random dialoguer error

§

AxotagError(TagError)

random axotag error

§

ParseIntError(ParseIntError)

random parseint error

§

TripleError(ParseError)

random triple parse error

§

Jinja

A problem with a jinja template, which is always a dist bug

Fields

§source: String

The SourceFile we were try to parse

§span: Option<SourceSpan>

The range the error was found on

§backtrace: JinjaErrorWithBacktrace

Details of the error

§

Wix

Error from (cargo-)wix

Fields

§msi: String

The msi we were trying to build

§details: Error

The underlying wix error

§

WixInit

Error from (cargo-)wix init

Fields

§package: String

The package

§details: Error

The underlying wix error

§

CargoTomlParse

Error parsing metadata in Cargo.toml (json because it’s from cargo-metadata)

Fields

§manifest_path: Utf8PathBuf

path to file

§cause: Error

Inner error

§

NoUpdateVersion

User declined to update dist, refuse to make progress

Fields

§project_version: Version

Version the config had

§running_version: Version

Version they’re running

§

CantEnableGithubUrlInconsistent

User tried to enable Github CI support but had inconsistent urls for the repo

Fields

§inner: AxoprojectError

inner error that caught this

§

CantEnableGithubNoUrl

User tried to enable Github CI support but no url for the repo

Fields

§manifest_list: String

List of manifests to change

§

CantEnableGithubUrlNotGithub

We got a repository URL but couldn’t interpret it as a GitHub repo

Fields

§inner: AxoprojectError

inner error that caught this

§

ScopeMustBeLowercase

User supplied an illegal npm scope

Fields

§scope: String

The incorrectly-formatted scope

§

InstallPathInvalid

Completely unknown format to install-path

NOTE: we can’t use diagnostic(help) here because this will get crammed into a serde_json error, reducing it to a String. So we inline the help!

Fields

§path: String

The full value passed to install-path

§

InstallPathEnvSlash

Being pedantic about the env-var mode of install-path to be consistent

NOTE: we can’t use diagnostic(help) here because this will get crammed into a serde_json error, reducing it to a String. So we inline the help!

Fields

§path: String

The full value passed to install-path

§

InstallPathHomeSubdir

Being pedantic about the home mode of install-path to be consistent

NOTE: we can’t use diagnostic(help) here because this will get crammed into a serde_json error, reducing it to a String. So we inline the help!

Fields

§path: String

The full value passed to install-path

§

PreciseImpossible

explicitly requested workspace builds, but had packages with custom feature settings

Fields

§packages: Vec<Utf8PathBuf>

paths of problem manifests

§

MismatchedTaps

packages disagreed on homebrew taps

Fields

§packages: Vec<Utf8PathBuf>

paths of problem manifests

§

MismatchedPublishers

packages disagreed on publishers

Fields

§packages: Vec<Utf8PathBuf>

paths of problem manifests

§

MismatchedPrereleases

publishers disagreed on prereleases

§

NothingToRelease

parse_tag concluded there was nothing to release

Fields

§help: String

full help printout (very dynamic)

§

TooManyUnrelatedApps

parse_tag concluded there are too many unrelated things for a single tag

Fields

§help: String

full help printout (very dynamic)

§

CheckFileMismatch

Not an error; indicates that a file’s contents differ via –check

Fields

§file: SourceFile

The file whose contents differ

§diff: String

The diff

§

ContradictoryGenerateModes

dist generate was passed an explicit GenerateMode but the config in their Cargo.toml has that mode set to allow-dirty, a contradiction!

Fields

§generate_mode: GenerateMode

The problematic mode

§

MultiPackage

msi/pkg with too many packages

Fields

§artifact_name: ArtifactId

Name of the artifact

§spec1: String

One of the packages

§spec2: String

A different package

§

NoPackage

msi/pkg with too few packages

Fields

§artifact_name: ArtifactId

Name of the msi

§

MissingWixGuids

These GUIDs for msi’s are required and enforced by dist generate --check

Fields

§manifest_path: Utf8PathBuf

The Cargo.toml missing them

§keys: &'static [&'static str]

The missing keys

§

UnrecognizedJobStyle

unrecognized job style

Fields

§style: String

value provided

§

UnrecognizedHostingStyle

unrecognized hosting style

Fields

§style: String

value provided

§

NoGitHubHosting

unrecognized hosting style

§

UnrecognizedCiStyle

unrecognized ci style

Fields

§style: String

value provided

§

UnrecognizedLibraryStyle

unrecognized library style

Fields

§style: String

value provided

§

LinkageCheckInvalidOS

Linkage report can’t be run for this combination of OS and target

Fields

§host: String

The OS the check was run on

§target: TripleName

The OS being checked

§

LinkageCheckUnsupportedBinary

Linkage report can’t be run for this target

§

EnvParseError

Error parsing a string containing an environment variable in VAR=value syntax

Fields

§line: String

The line of text that couldn’t be parsed

§

GitArchiveError

An error running git archive

§

GitSubmoduleCommitError

An error running git -C path rev-parse HEAD

Fields

§path: String

The path we failed to fetch

§

ToolMissing

A required tool is missing

Fields

§tool: String

the name of the missing tool

§

EnvToolsMissing

One or more required tools are missing.

Fields

§tools: Vec<String>

the names of the missing tools

§

NoAxoupdaterForTarget

Unknown target requested

Fields

§target: String

The target triple being built for

§

AxoupdaterReleaseCheckFailed

reqwest returned non-2xx/404 when checking axoupdater releases

§

UnrecognizedCompression

Failed to determine how to uncompress something

Fields

§extension: String

The file extension of the unrecognized file

§

MissingBinaries

Binaries were missing

Fields

§pkg_name: String

Name of package

§bin_name: String

Name of binary

§

UpdateFailed

Error during dist selfupdate

§

UpdateNotInWorkspace

Trying to run dist selfupdate in a random dir

Fields

§cause: ProjectError

The report about the missing workspace

§

IncompatibleInstallPathConfiguration

Trying to include CargoHome with other install paths

§

CliMissingTargets

Passed –artifacts but no –target

Fields

§host_target: TripleName

Current host target

§

NeedsInit

Workspace isn’t init

§

MismatchedDistVersion

Running different version from config

Fields

§config_version: String

config version

§running_version: String

running version

§

FailedCargoVersion

Failed to make sense of ‘cargo -vV’

§

GithubRepoPairParse

Failed to parse Github repo pair

Fields

§pair: String

The input

§

GithubUnknownPermission

Unknown permission specified in GitHub Actions config

Fields

§levels: Vec<String>

The input

§

UnrecognizedTarget

An unknown target was found

Fields

§target: TripleName

The target in question

§

EmptyInstaller

Installers requested despite having nothing to install

§

GithubBuildSetupNotFound

Configuration value for github-build-setup defined but not found

Fields

§details: AxoassetError

Inner i/o error with file path

§

GithubBuildSetupParse

Configuration value for github-build-setup defined but not found

Fields

§details: AxoassetError

Inner parse error with path and spans

§

GithubBuildSetupNotValid

github-build-setup file contents are invalid

Fields

§file_path: Utf8PathBuf

The value from the configuration file

§message: String

Error message details

§

UnusedMetadata

Something has metadata.dist but shouldn’t

Fields

§manifest_path: Utf8PathBuf

The manifest that had the metadata.dist

§dist_manifest_path: Utf8PathBuf

The dist.toml/dist-workspace.toml that means it’s ignored

§

SusBuildCommand

Build command looks like they put args in same string as command

Fields

§manifest: Utf8PathBuf

path to manifest

§command: String

what the command was

§

NoDistScript

missing “dist” script in a package.json

Fields

§manifest: Utf8PathBuf

path to package.json

§

UnsupportedCrossCompile

Unsupported cross-compilation host/target combination

Fields

§host: Triple

The host system

§target: Triple

The target system

§details: String

Additional details about why this combination is unsupported

§

CannotDoCargoAuditableAndCrossCompile

Cannot use cross-compilation with cargo-auditable

Fields

§host: Triple

The host system

§target: Triple

The target system

§

CargoOnlyBuildOptions

Generic build with Cargo-only build options

Fields

§options: Vec<String>

The names of the invalid options

§

NoBuildCommand

missing “build-command” for a package that needs one

Fields

§manifest: Utf8PathBuf

path to manifest

§

UnexpectedBuildCommand

cargo package with build-command

Fields

§manifest: Utf8PathBuf

path to manifest

§

CertificateDecodeError

Failure to decode base64-encoded certificate

§

MacPkgConfigMissing

Missing configuration for a .pkg

§

MacPkgBundleIdentifierMissing

User left identifier empty in init

§

AxoupdaterTooOld

Project depends on a too-old axoupdater

Fields

§package_name: String

Name of the package

§source_name: String

The package that depended on axoupdater

§minimum: Version

Minimum supported version

§your_version: Version

Version the project uses

Trait Implementations§

Source§

impl Debug for DistError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Diagnostic for DistError

Source§

fn code(&self) -> Option<Box<dyn Display + '_>>

Unique diagnostic code that can be used to look up more information about this Diagnostic. Ideally also globally unique, and documented in the toplevel crate’s documentation for easy searching. Rust path format (foo::bar::baz) is recommended, but more classic codes like E0123 or enums will work just fine.
Source§

fn help(&self) -> Option<Box<dyn Display + '_>>

Additional help text related to this Diagnostic. Do you have any advice for the poor soul who’s just run into this issue?
Source§

fn severity(&self) -> Option<Severity>

Diagnostic severity. This may be used by ReportHandlers to change the display format of this diagnostic. Read more
Source§

fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>

Labels to apply to this Diagnostic’s Diagnostic::source_code
Source§

fn source_code(&self) -> Option<&dyn SourceCode>

Source code to apply this Diagnostic’s Diagnostic::labels to.
Source§

fn related(&self) -> Option<Box<dyn Iterator<Item = &dyn Diagnostic> + '_>>

Additional related Diagnostics.
Source§

fn url(&self) -> Option<Box<dyn Display + '_>>

URL to visit for a more detailed explanation/help about this Diagnostic.
Source§

fn diagnostic_source(&self) -> Option<&dyn Diagnostic>

The cause of the error.
Source§

impl Display for DistError

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Error for DistError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AxoassetError> for DistError

Source§

fn from(source: AxoassetError) -> Self

Converts to this type from the input type.
Source§

impl From<AxoprocessError> for DistError

Source§

fn from(source: AxoprocessError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DistError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DistError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DistError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for DistError

Source§

fn from(details: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromPathBufError> for DistError

Source§

fn from(source: FromPathBufError) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for DistError

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<GazenotError> for DistError

Source§

fn from(source: GazenotError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseError> for DistError

Source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIntError> for DistError

Source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.
Source§

impl From<ProjectError> for DistError

Source§

fn from(source: ProjectError) -> Self

Converts to this type from the input type.
Source§

impl From<TagError> for DistError

Source§

fn from(source: TagError) -> Self

Converts to this type from the input type.

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> ApplyValExt for T

Source§

fn apply_val(&mut self, layer: Option<T>)

Merges a T with an Option<T> 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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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

impl<T> ErasedDestructor for T
where T: 'static,