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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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