pub struct HakariBuilder<'g> { /* private fields */ }
Expand description
Configures and constructs Hakari
instances.
This struct provides a number of options that determine how Hakari
instances are generated.
Implementations§
Source§impl<'g> HakariBuilder<'g>
impl<'g> HakariBuilder<'g>
Sourcepub fn manage_dep_ops(
&self,
workspace_set: &PackageSet<'g>,
) -> Option<WorkspaceOps<'g, '_>>
pub fn manage_dep_ops( &self, workspace_set: &PackageSet<'g>, ) -> Option<WorkspaceOps<'g, '_>>
Returns the set of operations that need to be performed to add the workspace-hack dependency to the given set of workspace crates.
Also includes remove operations for the workspace-hack dependency from excluded crates.
Returns None
if the hakari package wasn’t specified at construction time.
Requires the cli-support
feature to be enabled.
Sourcepub fn add_dep_ops(
&self,
workspace_set: &PackageSet<'g>,
force: bool,
) -> Option<WorkspaceOps<'g, '_>>
pub fn add_dep_ops( &self, workspace_set: &PackageSet<'g>, force: bool, ) -> Option<WorkspaceOps<'g, '_>>
Returns the set of operations that need to be performed to add the workspace-hack dependency to the given set of workspace crates.
Returns None
if the hakari package wasn’t specified at construction time.
Requires the cli-support
feature to be enabled.
Sourcepub fn remove_dep_ops(
&self,
workspace_set: &PackageSet<'g>,
force: bool,
) -> Option<WorkspaceOps<'g, '_>>
pub fn remove_dep_ops( &self, workspace_set: &PackageSet<'g>, force: bool, ) -> Option<WorkspaceOps<'g, '_>>
Returns the set of operations that need to be performed to remove the workspace-hack dependency from the given set of workspace crates.
Returns None
if the hakari package wasn’t specified at construction time.
Requires the cli-support
feature to be enabled.
Source§impl<'g> HakariBuilder<'g>
impl<'g> HakariBuilder<'g>
Sourcepub fn from_summary(
graph: &'g PackageGraph,
summary: &HakariBuilderSummary,
) -> Result<Self, Error>
pub fn from_summary( graph: &'g PackageGraph, summary: &HakariBuilderSummary, ) -> Result<Self, Error>
Constructs a HakariBuilder
from a PackageGraph
and a serialized summary.
Requires the cli-support
feature to be enabled.
Returns an error if the summary references a package that’s not present, or if there was
some other issue while creating a HakariBuilder
from the summary.
Source§impl<'g> HakariBuilder<'g>
impl<'g> HakariBuilder<'g>
Sourcepub fn new(
graph: &'g PackageGraph,
hakari_id: Option<&PackageId>,
) -> Result<Self, Error>
pub fn new( graph: &'g PackageGraph, hakari_id: Option<&PackageId>, ) -> Result<Self, Error>
Creates a new HakariBuilder
instance from a PackageGraph
.
The Hakari package itself is usually present in the workspace. If so, specify its
package ID, otherwise pass in None
.
Returns an error if a Hakari package ID is specified but it isn’t known to the graph, or isn’t in the workspace.
Sourcepub fn graph(&self) -> &'g PackageGraph
pub fn graph(&self) -> &'g PackageGraph
Returns the PackageGraph
used to construct this Hakari
instance.
Sourcepub fn hakari_package(&self) -> Option<&PackageMetadata<'g>>
pub fn hakari_package(&self) -> Option<&PackageMetadata<'g>>
Returns the Hakari package, or None
if it wasn’t passed into new
.
Sourcepub fn read_toml(&self) -> Option<Result<HakariCargoToml, CargoTomlError>>
pub fn read_toml(&self) -> Option<Result<HakariCargoToml, CargoTomlError>>
Reads the existing TOML file for the Hakari package from disk, returning a
HakariCargoToml
.
This can be used with Hakari::to_toml_string
to manage the
contents of the Hakari package’s TOML file on disk.
Returns an error if there was an issue reading the TOML file from disk, or None
if
this builder was created without a Hakari package.
Sourcepub fn set_platforms(
&mut self,
platforms: impl IntoIterator<Item = impl Into<Cow<'static, str>>>,
) -> Result<&mut Self, TargetSpecError>
pub fn set_platforms( &mut self, platforms: impl IntoIterator<Item = impl Into<Cow<'static, str>>>, ) -> Result<&mut Self, TargetSpecError>
Sets a list of platforms for hakari
to use.
By default, hakari
unifies features that are always enabled across all platforms. If
builds are commonly performed on a few platforms, hakari
can output platform-specific
instructions for those builds.
This currently supports target triples only, without further customization around
target features or flags. In the future, this may support cfg()
expressions using
an SMT solver.
Call set_platforms
with an empty list to reset to default behavior.
Returns an error if a platform wasn’t known to target_spec
, the library hakari
uses
to resolve platforms.
Sourcepub fn platforms(&self) -> impl ExactSizeIterator<Item = &str> + '_
pub fn platforms(&self) -> impl ExactSizeIterator<Item = &str> + '_
Returns the platforms set through set_platforms
, or an empty list if no platforms are
set.
Sourcepub fn set_resolver(&mut self, resolver: CargoResolverVersion) -> &mut Self
pub fn set_resolver(&mut self, resolver: CargoResolverVersion) -> &mut Self
Sets the Cargo resolver version.
By default, HakariBuilder
uses version 2 of the Cargo
resolver. For more about Cargo resolvers, see the documentation for
CargoResolverVersion
.
Sourcepub fn resolver(&self) -> CargoResolverVersion
pub fn resolver(&self) -> CargoResolverVersion
Returns the current Cargo resolver version.
Sourcepub fn add_traversal_excludes<'b>(
&mut self,
excludes: impl IntoIterator<Item = &'b PackageId>,
) -> Result<&mut Self, Error>
pub fn add_traversal_excludes<'b>( &mut self, excludes: impl IntoIterator<Item = &'b PackageId>, ) -> Result<&mut Self, Error>
Pretends that the provided packages don’t exist during graph traversals.
Users may wish to not consider certain packages while figuring out the unified feature set. Setting this option prevents those packages from being considered.
Practically, this means that:
- If a workspace package is specified, Cargo build simulations for it will not be run.
- If a third-party package is specified, it will not be present in the output, nor will any transitive dependencies or features enabled by it that aren’t enabled any other way. In other words, any packages excluded during traversal are also excluded from the final output.
Returns an error if any package IDs specified aren’t known to the graph.
Sourcepub fn traversal_excludes<'b>(
&'b self,
) -> impl Iterator<Item = &'g PackageId> + 'b
pub fn traversal_excludes<'b>( &'b self, ) -> impl Iterator<Item = &'g PackageId> + 'b
Returns the packages currently excluded during graph traversals.
Also returns the Hakari package if specified. This is because the Hakari package is treated as excluded while performing unification.
Sourcepub fn is_traversal_excluded(
&self,
package_id: &PackageId,
) -> Result<bool, Error>
pub fn is_traversal_excluded( &self, package_id: &PackageId, ) -> Result<bool, Error>
Returns true if a package ID is currently excluded during traversal.
Also returns true for the Hakari package if specified. This is because the Hakari package is treated as excluded by the algorithm.
Returns an error if this package ID isn’t known to the underlying graph.
Sourcepub fn add_final_excludes<'b>(
&mut self,
excludes: impl IntoIterator<Item = &'b PackageId>,
) -> Result<&mut Self, Error>
pub fn add_final_excludes<'b>( &mut self, excludes: impl IntoIterator<Item = &'b PackageId>, ) -> Result<&mut Self, Error>
Adds packages to be removed from the final output.
Unlike traversal_excludes
, these packages are considered
during traversals, but removed at the end.
Returns an error if any package IDs specified aren’t known to the graph.
Sourcepub fn final_excludes<'b>(&'b self) -> impl Iterator<Item = &'g PackageId> + 'b
pub fn final_excludes<'b>(&'b self) -> impl Iterator<Item = &'g PackageId> + 'b
Returns the packages to be removed from the final output.
Sourcepub fn is_final_excluded(&self, package_id: &PackageId) -> Result<bool, Error>
pub fn is_final_excluded(&self, package_id: &PackageId) -> Result<bool, Error>
Returns true if a package ID is currently excluded from the final output.
Returns an error if this package ID isn’t known to the underlying graph.
Sourcepub fn is_excluded(&self, package_id: &PackageId) -> Result<bool, Error>
pub fn is_excluded(&self, package_id: &PackageId) -> Result<bool, Error>
Returns true if a package ID is excluded from either the traversal or the final output.
Also returns true for the Hakari package if specified. This is because the Hakari package is treated as excluded by the algorithm.
Returns an error if this package ID isn’t known to the underlying graph.
Sourcepub fn add_registries(
&mut self,
registries: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>,
) -> &mut Self
pub fn add_registries( &mut self, registries: impl IntoIterator<Item = (impl Into<String>, impl Into<String>)>, ) -> &mut Self
Add alternate registries by (name, URL) pairs.
This is a temporary workaround until Cargo issue #9052 is resolved.
Sourcepub fn set_unify_target_host(
&mut self,
unify_target_host: UnifyTargetHost,
) -> &mut Self
pub fn set_unify_target_host( &mut self, unify_target_host: UnifyTargetHost, ) -> &mut Self
Whether and how to unify feature sets across target and host platforms.
This is an advanced feature that most users don’t need to set. For more information about
this option, see the documentation for UnifyTargetHost
.
Sourcepub fn unify_target_host(&self) -> UnifyTargetHost
pub fn unify_target_host(&self) -> UnifyTargetHost
Returns the current value of unify_target_host
.
Sourcepub fn set_output_single_feature(
&mut self,
output_single_feature: bool,
) -> &mut Self
pub fn set_output_single_feature( &mut self, output_single_feature: bool, ) -> &mut Self
Whether to unify feature sets for all dependencies.
By default, Hakari only produces output for dependencies that are built with more than one feature set. If set to true, Hakari will produce outputs for all dependencies, including those that don’t need to be unified.
This is rarely needed in production, and is most useful for testing and debugging scenarios.
Sourcepub fn output_single_feature(&self) -> bool
pub fn output_single_feature(&self) -> bool
Returns the current value of output_single_feature
.
Sourcepub fn set_dep_format_version(
&mut self,
dep_format_version: DepFormatVersion,
) -> &mut Self
pub fn set_dep_format_version( &mut self, dep_format_version: DepFormatVersion, ) -> &mut Self
Version of hakari data to output.
For more, see the documentation for DepFormatVersion
.
Sourcepub fn dep_format_version(&self) -> DepFormatVersion
pub fn dep_format_version(&self) -> DepFormatVersion
Returns the current value of dep_format_version
.
Sourcepub fn set_workspace_hack_line_style(
&mut self,
line_style: WorkspaceHackLineStyle,
) -> &mut Self
pub fn set_workspace_hack_line_style( &mut self, line_style: WorkspaceHackLineStyle, ) -> &mut Self
Kind of workspace-hack = ...
lines to output.
For more, see the documentation for WorkspaceHackLineStyle
.
Sourcepub fn workspace_hack_line_style(&self) -> WorkspaceHackLineStyle
pub fn workspace_hack_line_style(&self) -> WorkspaceHackLineStyle
Returns the current value of workspace_hack_line_style
.
Source§impl<'g> HakariBuilder<'g>
impl<'g> HakariBuilder<'g>
§Helpers for property testing
The methods in this section allow random instances of a HakariBuilder
to be generated, for use
in property-based testing scenarios.
Requires the proptest1
feature to be enabled.
Sourcepub fn proptest1_strategy(
graph: &'g PackageGraph,
hakari_id_strategy: impl Strategy<Value = Option<&'g PackageId>> + 'g,
) -> impl Strategy<Value = HakariBuilder<'g>> + 'g
pub fn proptest1_strategy( graph: &'g PackageGraph, hakari_id_strategy: impl Strategy<Value = Option<&'g PackageId>> + 'g, ) -> impl Strategy<Value = HakariBuilder<'g>> + 'g
Returns a Strategy
that generates random HakariBuilder
instances based on this graph.
Requires the proptest1
feature to be enabled.
§Panics
Panics if:
- there are no packages in this
PackageGraph
, or hakari_id
is specified but it isn’t known to the graph, or isn’t in the workspace.
Source§impl<'g> HakariBuilder<'g>
impl<'g> HakariBuilder<'g>
Sourcepub fn to_summary(&self) -> Result<HakariBuilderSummary, TargetSpecError>
pub fn to_summary(&self) -> Result<HakariBuilderSummary, TargetSpecError>
Converts this HakariBuilder
to a serializable summary.
Requires the cli-support
feature to be enabled.
Returns an error if there are any custom platforms. Serializing custom platforms is currently unsupported.
Source§impl<'g> HakariBuilder<'g>
impl<'g> HakariBuilder<'g>
Sourcepub fn verify(self) -> Result<(), VerifyErrors<'g>>
pub fn verify(self) -> Result<(), VerifyErrors<'g>>
Verify that hakari
worked properly.
Returns Ok(())
if only one version of every third-party dependency was built, or a list of
errors if at least one third-party dependency had more than one version built.
For more about how this works, see the documentation for the verify
module.
Trait Implementations§
Source§impl<'g> Clone for HakariBuilder<'g>
impl<'g> Clone for HakariBuilder<'g>
Source§fn clone(&self) -> HakariBuilder<'g>
fn clone(&self) -> HakariBuilder<'g>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'g> Freeze for HakariBuilder<'g>
impl<'g> RefUnwindSafe for HakariBuilder<'g>
impl<'g> Send for HakariBuilder<'g>
impl<'g> Sync for HakariBuilder<'g>
impl<'g> Unpin for HakariBuilder<'g>
impl<'g> UnwindSafe for HakariBuilder<'g>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
Source§fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
Source§fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
Source§fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
Source§fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
Source§fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
Source§fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
Source§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
Source§fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
Source§fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
Source§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Source§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Source§fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Source§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Source§fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
Source§fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
Source§fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
Source§fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
Source§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
Source§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
Source§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
Source§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
Source§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
Source§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
Source§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
Source§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
Source§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
Source§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
Source§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
Source§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
Source§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Source§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Source§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Source§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Source§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
Source§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
Source§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
Source§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
Source§fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
Source§fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
Source§fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
Source§fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
Source§fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
Source§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
Source§fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
Source§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more