pub struct TestContext {
pub root: ChildPath,
pub temp_dir: ChildPath,
pub cache_dir: ChildPath,
pub python_dir: ChildPath,
pub home_dir: ChildPath,
pub user_config_dir: ChildPath,
pub bin_dir: ChildPath,
pub venv: ChildPath,
pub workspace_root: PathBuf,
pub python_version: Option<PythonVersion>,
pub python_versions: Vec<(PythonVersion, PathBuf)>,
/* private fields */
}Expand description
Create a context for tests which simplifies shared behavior across tests.
- Set the current directory to a temporary directory (
temp_dir). - Set the cache dir to a different temporary directory (
cache_dir). - Set a cutoff for versions used in the resolution so the snapshots don’t change after a new release.
- Set the venv to a fresh
.venvintemp_dir
Fields§
§root: ChildPath§temp_dir: ChildPath§cache_dir: ChildPath§python_dir: ChildPath§home_dir: ChildPath§user_config_dir: ChildPath§bin_dir: ChildPath§venv: ChildPath§workspace_root: PathBuf§python_version: Option<PythonVersion>The Python version used for the virtual environment, if any.
python_versions: Vec<(PythonVersion, PathBuf)>All the Python versions available during this test context.
Implementations§
Source§impl TestContext
impl TestContext
Sourcepub fn new_with_bin(python_version: &str, uv_bin: PathBuf) -> Self
pub fn new_with_bin(python_version: &str, uv_bin: PathBuf) -> Self
Create a new test context with a virtual environment and explicit uv binary path.
This is called by the test_context! macro.
Sourcepub fn with_exclude_newer(self, exclude_newer: &str) -> Self
pub fn with_exclude_newer(self, exclude_newer: &str) -> Self
Set the “exclude newer” timestamp for all commands in this context.
Sourcepub fn with_http_timeout(self, http_timeout: &str) -> Self
pub fn with_http_timeout(self, http_timeout: &str) -> Self
Set the “http timeout” for all commands in this context.
Sourcepub fn with_concurrent_installs(self, concurrent_installs: &str) -> Self
pub fn with_concurrent_installs(self, concurrent_installs: &str) -> Self
Set the “concurrent installs” for all commands in this context.
Sourcepub fn with_filtered_counts(self) -> Self
pub fn with_filtered_counts(self) -> Self
Add extra standard filtering for messages like “Resolved 10 packages” which can differ between platforms.
In some cases, these counts are helpful for the snapshot and should not be filtered.
Sourcepub fn with_filtered_cache_size(self) -> Self
pub fn with_filtered_cache_size(self) -> Self
Add extra filtering for cache size output
Sourcepub fn with_filtered_missing_file_error(self) -> Self
pub fn with_filtered_missing_file_error(self) -> Self
Add extra standard filtering for Windows-compatible missing file errors.
Sourcepub fn with_filtered_exe_suffix(self) -> Self
pub fn with_filtered_exe_suffix(self) -> Self
Add extra standard filtering for executable suffixes on the current platform e.g.
drops .exe on Windows.
Sourcepub fn with_filtered_python_sources(self) -> Self
pub fn with_filtered_python_sources(self) -> Self
Add extra standard filtering for Python interpreter sources
Sourcepub fn with_filtered_python_names(self) -> Self
pub fn with_filtered_python_names(self) -> Self
Add extra standard filtering for Python executable names, e.g., stripping version number
and .exe suffixes.
Sourcepub fn with_filtered_virtualenv_bin(self) -> Self
pub fn with_filtered_virtualenv_bin(self) -> Self
Add extra standard filtering for venv executable directories on the current platform e.g.
Scripts on Windows and bin on Unix.
Sourcepub fn with_filtered_python_install_bin(self) -> Self
pub fn with_filtered_python_install_bin(self) -> Self
Add extra standard filtering for Python installation bin/ directories, which are not
present on Windows but are on Unix. See TestContext::with_filtered_virtualenv_bin for
the virtual environment equivalent.
Sourcepub fn with_pyvenv_cfg_filters(self) -> Self
pub fn with_pyvenv_cfg_filters(self) -> Self
Filtering for various keys in a pyvenv.cfg file that will vary
depending on the specific machine used:
home = foo/bar/baz/python3.X.X/binuv = X.Y.Zextends-environment = <path/to/parent/venv>
Sourcepub fn with_filtered_python_symlinks(self) -> Self
pub fn with_filtered_python_symlinks(self) -> Self
Add extra filtering for -> <PATH> symlink display for Python versions in the test
context, e.g., for use in uv python list.
Sourcepub fn with_filtered_path(self, path: &Path, name: &str) -> Self
pub fn with_filtered_path(self, path: &Path, name: &str) -> Self
Add extra standard filtering for a given path.
Sourcepub fn with_filtered_link_mode_warning(self) -> Self
pub fn with_filtered_link_mode_warning(self) -> Self
Adds a filter that specifically ignores the link mode warning.
This occurs in some cases and can be used on an ad hoc basis to squash
the warning in the snapshots. This is useful because the warning does
not consistently appear. It is dependent on the environment. (For
example, sometimes it’s dependent on whether /tmp and ~/.local live
on the same file system.)
Sourcepub fn with_filtered_not_executable(self) -> Self
pub fn with_filtered_not_executable(self) -> Self
Adds a filter for platform-specific errors when a file is not executable.
Sourcepub fn with_filtered_python_keys(self) -> Self
pub fn with_filtered_python_keys(self) -> Self
Adds a filter that ignores platform information in a Python installation key.
Sourcepub fn with_filtered_latest_python_versions(self) -> Self
pub fn with_filtered_latest_python_versions(self) -> Self
Adds a filter that replaces the latest Python patch versions with [LATEST] placeholder.
Sourcepub fn with_filtered_windows_temp_dir(self) -> Self
pub fn with_filtered_windows_temp_dir(self) -> Self
Add a filter that ignores temporary directory in path.
Sourcepub fn with_filtered_compiled_file_count(self) -> Self
pub fn with_filtered_compiled_file_count(self) -> Self
Add a filter for (bytecode) compilation file counts
Sourcepub fn with_cyclonedx_filters(self) -> Self
pub fn with_cyclonedx_filters(self) -> Self
Adds filters for non-deterministic CycloneDX data
Sourcepub fn with_collapsed_whitespace(self) -> Self
pub fn with_collapsed_whitespace(self) -> Self
Add a filter that collapses duplicate whitespace.
Sourcepub fn with_python_download_cache(self) -> Self
pub fn with_python_download_cache(self) -> Self
Use a shared global cache for Python downloads.
pub fn with_empty_python_install_mirror(self) -> Self
Sourcepub fn with_managed_python_dirs(self) -> Self
pub fn with_managed_python_dirs(self) -> Self
Add extra directories and configuration for managed Python installations.
pub fn with_versions_as_managed(self, versions: &[&str]) -> Self
Sourcepub fn with_filter(self, filter: (impl Into<String>, impl Into<String>)) -> Self
pub fn with_filter(self, filter: (impl Into<String>, impl Into<String>)) -> Self
Add a custom filter to the TestContext.
pub fn with_unset_git_credential_helper(self) -> Self
Sourcepub fn clear_filters(self) -> Self
pub fn clear_filters(self) -> Self
Clear filters on TestContext.
Sourcepub fn test_bucket_dir() -> PathBuf
pub fn test_bucket_dir() -> PathBuf
Default to the canonicalized path to the temp directory. We need to do this because on
macOS (and Windows on GitHub Actions) the standard temp dir is a symlink. (On macOS, the
temporary directory is, like /var/..., which resolves to /private/var/....)
It turns out that, at least on macOS, if we pass a symlink as current_dir, it gets
immediately resolved (such that if you call current_dir in the running Command, it
returns resolved symlink). This breaks some snapshot tests, since we don’t want to
resolve symlinks for user-provided paths.
Sourcepub fn new_with_versions_and_bin(
python_versions: &[&str],
uv_bin: PathBuf,
) -> Self
pub fn new_with_versions_and_bin( python_versions: &[&str], uv_bin: PathBuf, ) -> Self
Create a new test context with multiple Python versions and explicit uv binary path.
Does not create a virtual environment by default, but the first Python version
can be used to create a virtual environment with TestContext::create_venv.
This is called by the test_context_with_versions! macro.
pub fn disallow_git_cli(bin_dir: &Path) -> Result<()>
Sourcepub fn with_git_lfs_config(self) -> Self
pub fn with_git_lfs_config(self) -> Self
Setup Git LFS Filters
You can find the default filters in https://github.com/git-lfs/git-lfs/blob/v3.7.1/lfs/attribute.go#L66-L71 We set required to true to get a full stacktrace when these commands fail.
Shared behaviour for almost all test commands.
- Use a temporary cache directory
- Use a temporary virtual environment with the Python version of
Self - Don’t wrap text output based on the terminal we’re in, the test output doesn’t get printed but snapshotted to a string.
- Use a fake
HOMEto avoid accidentally changing the developer’s machine. - Hide other Pythons with
UV_PYTHON_INSTALL_DIRand installed interpreters withUV_TEST_PYTHON_PATHand an active venv (if applicable) by removingVIRTUAL_ENV. - Increase the stack size to avoid stack overflows on windows due to large async functions.
Only the arguments of TestContext::add_shared_options.
Only the environment variables of TestContext::add_shared_options.
Sourcepub fn pip_compile(&self) -> Command
pub fn pip_compile(&self) -> Command
Create a pip compile command for testing.
pub fn pip_show(&self) -> Command
Sourcepub fn pip_freeze(&self) -> Command
pub fn pip_freeze(&self) -> Command
Create a pip freeze command with options shared across scenarios.
Sourcepub fn pip_check(&self) -> Command
pub fn pip_check(&self) -> Command
Create a pip check command with options shared across scenarios.
pub fn pip_list(&self) -> Command
Sourcepub fn pip_install(&self) -> Command
pub fn pip_install(&self) -> Command
Create a pip install command with options shared across scenarios.
Sourcepub fn pip_uninstall(&self) -> Command
pub fn pip_uninstall(&self) -> Command
Create a pip uninstall command with options shared across scenarios.
Sourcepub fn init(&self) -> Command
pub fn init(&self) -> Command
Create a uv init command with options shared across scenarios and
isolated from any git repository that may exist in a parent directory.
Sourcepub fn workspace_metadata(&self) -> Command
pub fn workspace_metadata(&self) -> Command
Create a uv workspace metadata command with options shared across scenarios.
Sourcepub fn workspace_dir(&self) -> Command
pub fn workspace_dir(&self) -> Command
Create a uv workspace dir command with options shared across scenarios.
Sourcepub fn workspace_list(&self) -> Command
pub fn workspace_list(&self) -> Command
Create a uv workspace list command with options shared across scenarios.
Sourcepub fn export(&self) -> Command
pub fn export(&self) -> Command
Create a uv export command with options shared across scenarios.
Sourcepub fn format(&self) -> Command
pub fn format(&self) -> Command
Create a uv format command with options shared across scenarios.
pub fn version(&self) -> Command
pub fn self_version(&self) -> Command
pub fn self_update(&self) -> Command
Sourcepub fn publish(&self) -> Command
pub fn publish(&self) -> Command
Create a uv publish command with options shared across scenarios.
Sourcepub fn python_find(&self) -> Command
pub fn python_find(&self) -> Command
Create a uv python find command with options shared across scenarios.
Sourcepub fn python_list(&self) -> Command
pub fn python_list(&self) -> Command
Create a uv python list command with options shared across scenarios.
Sourcepub fn python_install(&self) -> Command
pub fn python_install(&self) -> Command
Create a uv python install command with options shared across scenarios.
Sourcepub fn python_uninstall(&self) -> Command
pub fn python_uninstall(&self) -> Command
Create a uv python uninstall command with options shared across scenarios.
Sourcepub fn python_upgrade(&self) -> Command
pub fn python_upgrade(&self) -> Command
Create a uv python upgrade command with options shared across scenarios.
Sourcepub fn python_pin(&self) -> Command
pub fn python_pin(&self) -> Command
Create a uv python pin command with options shared across scenarios.
Sourcepub fn python_dir(&self) -> Command
pub fn python_dir(&self) -> Command
Create a uv python dir command with options shared across scenarios.
Sourcepub fn tool_run(&self) -> Command
pub fn tool_run(&self) -> Command
Create a uv tool run command with options shared across scenarios.
Sourcepub fn tool_upgrade(&self) -> Command
pub fn tool_upgrade(&self) -> Command
Create a uv upgrade run command with options shared across scenarios.
Sourcepub fn tool_install(&self) -> Command
pub fn tool_install(&self) -> Command
Create a uv tool install command with options shared across scenarios.
Sourcepub fn tool_list(&self) -> Command
pub fn tool_list(&self) -> Command
Create a uv tool list command with options shared across scenarios.
Sourcepub fn tool_dir(&self) -> Command
pub fn tool_dir(&self) -> Command
Create a uv tool dir command with options shared across scenarios.
Sourcepub fn tool_uninstall(&self) -> Command
pub fn tool_uninstall(&self) -> Command
Create a uv tool uninstall command with options shared across scenarios.
Sourcepub fn cache_size(&self) -> Command
pub fn cache_size(&self) -> Command
Create a uv cache size command.
Sourcepub fn build_backend(&self) -> Command
pub fn build_backend(&self) -> Command
Create a uv build_backend command.
Note that this command is hidden and only invoking it through a build frontend is supported.
Sourcepub fn interpreter(&self) -> PathBuf
pub fn interpreter(&self) -> PathBuf
The path to the Python interpreter in the venv.
Don’t use this for Command::new, use Self::python_command instead.
pub fn python_command(&self) -> Command
Sourcepub fn auth_login(&self) -> Command
pub fn auth_login(&self) -> Command
Create a uv auth login command.
Sourcepub fn auth_logout(&self) -> Command
pub fn auth_logout(&self) -> Command
Create a uv auth logout command.
Sourcepub fn auth_helper(&self) -> Command
pub fn auth_helper(&self) -> Command
Create a uv auth helper --protocol bazel get command.
Sourcepub fn auth_token(&self) -> Command
pub fn auth_token(&self) -> Command
Create a uv auth token command.
Sourcepub fn with_real_home(self) -> Self
pub fn with_real_home(self) -> Self
Set HOME to the real home directory.
We need this for testing commands which use the macOS keychain.
Sourcepub fn assert_command(&self, command: &str) -> Assert
pub fn assert_command(&self, command: &str) -> Assert
Run the given python code and check whether it succeeds.
Sourcepub fn assert_file(&self, file: impl AsRef<Path>) -> Assert
pub fn assert_file(&self, file: impl AsRef<Path>) -> Assert
Run the given python file and check whether it succeeds.
Sourcepub fn assert_installed(&self, package: &'static str, version: &'static str)
pub fn assert_installed(&self, package: &'static str, version: &'static str)
Assert a package is installed with the given version.
Sourcepub fn assert_not_installed(&self, package: &'static str)
pub fn assert_not_installed(&self, package: &'static str)
Assert a package is not installed.
Sourcepub fn path_patterns(path: impl AsRef<Path>) -> Vec<String>
pub fn path_patterns(path: impl AsRef<Path>) -> Vec<String>
Generate various escaped regex patterns for the given path.
pub fn python_path(&self) -> OsString
Sourcepub fn filters(&self) -> Vec<(&str, &str)>
pub fn filters(&self) -> Vec<(&str, &str)>
Standard snapshot filters plus those for this test context.
Sourcepub fn filters_without_standard_filters(&self) -> Vec<(&str, &str)>
pub fn filters_without_standard_filters(&self) -> Vec<(&str, &str)>
Only the filters added to this test context.
Sourcepub fn python_kind(&self) -> &'static str
pub fn python_kind(&self) -> &'static str
For when we add pypy to the test suite.
Sourcepub fn site_packages(&self) -> PathBuf
pub fn site_packages(&self) -> PathBuf
Returns the site-packages folder inside the venv.
Sourcepub fn reset_venv(&self)
pub fn reset_venv(&self)
Reset the virtual environment in the test context.
Sourcepub fn copy_ecosystem_project(&self, name: &str)
pub fn copy_ecosystem_project(&self, name: &str)
Copies the files from the ecosystem project given into this text context.
This will almost always write at least a pyproject.toml into this
test context.
The given name should correspond to the name of a sub-directory (not a
path to it) in the test/ecosystem directory.
This panics (fails the current test) for any failure.
Sourcepub fn diff_lock(&self, change: impl Fn(&Self) -> Command) -> String
pub fn diff_lock(&self, change: impl Fn(&Self) -> Command) -> String
Creates a way to compare the changes made to a lock file.
This routine starts by copying (not moves) the generated lock file to
memory. It then calls the given closure with this test context to get a
Command and runs the command. The diff between the old lock file and
the new one is then returned.
This assumes that a lock has already been performed.
Auto Trait Implementations§
impl Freeze for TestContext
impl RefUnwindSafe for TestContext
impl Send for TestContext
impl Sync for TestContext
impl Unpin for TestContext
impl UnwindSafe for TestContext
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§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(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, 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