pub struct RustLanguage {
pub base_dir: PathBuf,
pub bin_path: Option<PathBuf>,
pub rustup_dir: PathBuf,
pub temp_dir: PathBuf,
pub version: Option<String>,
/* private fields */
}
Fields§
§base_dir: PathBuf
§bin_path: Option<PathBuf>
§rustup_dir: PathBuf
§temp_dir: PathBuf
§version: Option<String>
Implementations§
Trait Implementations§
Source§impl Debug for RustLanguage
impl Debug for RustLanguage
Source§impl Describable<'_> for RustLanguage
impl Describable<'_> for RustLanguage
Source§impl Detector<'_> for RustLanguage
impl Detector<'_> for RustLanguage
Source§fn detect_version_from<'life0, 'life1, 'async_trait>(
&'life0 self,
_working_dir: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn detect_version_from<'life0, 'life1, 'async_trait>(
&'life0 self,
_working_dir: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Attempt to detect an applicable version from the provided working directory.
Source§impl Downloadable<'_> for RustLanguage
impl Downloadable<'_> for RustLanguage
Source§fn get_download_path(&self) -> Result<PathBuf, ProtoError>
fn get_download_path(&self) -> Result<PathBuf, ProtoError>
Return an absolute file path to the downloaded file.
This may not exist, as the path is composed ahead of time.
This is typically
~/.proto/temp/<file>
.Source§fn get_download_url(&self) -> Result<String, ProtoError>
fn get_download_url(&self) -> Result<String, ProtoError>
Return a URL to download the tool’s archive from a registry.
Source§fn download<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_to_file: &'life1 Path,
_from_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn download<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_to_file: &'life1 Path,
_from_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Download the tool (as an archive) from its distribution registry
into the
~/.proto/temp
folder and return an absolute file path.
A custom URL that points to the downloadable archive can be
provided as the 2nd argument.Source§impl Executable<'_> for RustLanguage
impl Executable<'_> for RustLanguage
Source§fn find_bin_path<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_bin_path<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find the absolute file path to the tool’s binary that will be executed.
This happens after a tool has been downloaded and installed.
Source§fn get_bin_path(&self) -> Result<&Path, ProtoError>
fn get_bin_path(&self) -> Result<&Path, ProtoError>
Return an absolute file path to the executable binary for the tool.
Source§fn get_globals_bin_dir(&self) -> Result<Option<PathBuf>, ProtoError>
fn get_globals_bin_dir(&self) -> Result<Option<PathBuf>, ProtoError>
Return an absolute file path to the directory containing all
globally installed packages.
Source§impl Installable<'_> for RustLanguage
impl Installable<'_> for RustLanguage
Source§fn get_archive_prefix(&self) -> Result<Option<String>, ProtoError>
fn get_archive_prefix(&self) -> Result<Option<String>, ProtoError>
Return a prefix that will be removed from all paths when
unpacking an archive and copying the files.
Source§fn get_install_dir(&self) -> Result<PathBuf, ProtoError>
fn get_install_dir(&self) -> Result<PathBuf, ProtoError>
Return an absolute file path to the directory containing the installed tool.
This is typically
~/.proto/tools/<tool>/<version>
.Source§fn install<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
install_dir: &'life1 Path,
_download_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn install<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
install_dir: &'life1 Path,
_download_path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run any installation steps after downloading and verifying the tool.
This is typically unzipping an archive, and running any installers/binaries.
Source§fn uninstall<'life0, 'life1, 'async_trait>(
&'life0 self,
install_dir: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn uninstall<'life0, 'life1, 'async_trait>(
&'life0 self,
install_dir: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Uninstall the tool by deleting the install directory.
Source§fn should_unpack(&self) -> bool
fn should_unpack(&self) -> bool
Whether or not the downloaded file should be unpacked before installing.
Source§impl Resolvable<'_> for RustLanguage
impl Resolvable<'_> for RustLanguage
Source§fn get_resolved_version(&self) -> &str
fn get_resolved_version(&self) -> &str
Return the resolved version.
Source§fn load_version_manifest<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VersionManifest, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_version_manifest<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<VersionManifest, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load the upstream version and release manifest.
Source§fn resolve_version<'life0, 'life1, 'async_trait>(
&'life0 mut self,
initial_version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_version<'life0, 'life1, 'async_trait>(
&'life0 mut self,
initial_version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Given an initial version, resolve it to a fully qualifed and semantic version
according to the tool’s ecosystem.
Source§fn set_version(&mut self, version: &str)
fn set_version(&mut self, version: &str)
Explicitly set the resolved version.
Source§fn get_default_version(&self) -> Option<&str>
fn get_default_version(&self) -> Option<&str>
Return the version to be used as the global default.
Source§impl Shimable<'_> for RustLanguage
impl Shimable<'_> for RustLanguage
Source§fn create_shims<'life0, 'async_trait>(
&'life0 mut self,
_find_only: bool,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_shims<'life0, 'async_trait>(
&'life0 mut self,
_find_only: bool,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create one or many shims in the root of the tool’s install directory.
Source§fn get_shim_path(&self) -> Option<&Path>
fn get_shim_path(&self) -> Option<&Path>
Return an absolute path to the shim file if utilizing shims.
Source§impl Tool<'_> for RustLanguage
impl Tool<'_> for RustLanguage
fn as_any(&self) -> &dyn Any
fn get_manifest(&self) -> Result<&Manifest, ProtoError>
fn get_manifest_mut(&mut self) -> Result<&mut Manifest, ProtoError>
fn get_tool_dir(&self) -> &Path
fn get_manifest_path(&self) -> PathBuf
fn before_setup<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn setup<'life0, 'life1, 'async_trait>(
&'life0 mut self,
initial_version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn setup_shims<'life0, 'async_trait>(
&'life0 mut self,
force: bool,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn is_setup<'life0, 'life1, 'async_trait>(
&'life0 mut self,
initial_version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn after_setup<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn cleanup<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn before_teardown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn teardown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn after_teardown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Source§impl Verifiable<'_> for RustLanguage
impl Verifiable<'_> for RustLanguage
Source§fn get_checksum_path(&self) -> Result<PathBuf, ProtoError>
fn get_checksum_path(&self) -> Result<PathBuf, ProtoError>
Return an absolute file path to the checksum file.
This may not exist, as the path is composed ahead of time.
This is typically
~/.proto/temp/<file>
.Source§fn get_checksum_url(&self) -> Result<Option<String>, ProtoError>
fn get_checksum_url(&self) -> Result<Option<String>, ProtoError>
Return a URL to download the tool’s checksum manifest from a registry.
Source§fn verify_checksum<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_checksum_file: &'life1 Path,
_download_file: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify_checksum<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_checksum_file: &'life1 Path,
_download_file: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify the downloaded file using the checksum strategy for the tool.
Common strategies are SHA256 and MD5.
Source§fn download_checksum<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
to_file: &'life1 Path,
from_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn download_checksum<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
to_file: &'life1 Path,
from_url: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, ProtoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
If applicable, download all files necessary for verifying checksums.
Auto Trait Implementations§
impl !Freeze for RustLanguage
impl RefUnwindSafe for RustLanguage
impl Send for RustLanguage
impl Sync for RustLanguage
impl Unpin for RustLanguage
impl UnwindSafe for RustLanguage
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
Mutably borrows from an owned value. Read more
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read moreSource§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>
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 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>
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 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,
Set the foreground color generically Read more
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Set the background color generically. Read more
Source§fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black<'a>(&'a self) -> FgColorDisplay<'a, Black, Self>
Change the foreground color to black
Source§fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black<'a>(&'a self) -> BgColorDisplay<'a, Black, Self>
Change the background color to black
Source§fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red<'a>(&'a self) -> FgColorDisplay<'a, Red, Self>
Change the foreground color to red
Source§fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red<'a>(&'a self) -> BgColorDisplay<'a, Red, Self>
Change the background color to red
Source§fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green<'a>(&'a self) -> FgColorDisplay<'a, Green, Self>
Change the foreground color to green
Source§fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green<'a>(&'a self) -> BgColorDisplay<'a, Green, Self>
Change the background color to green
Source§fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow<'a>(&'a self) -> FgColorDisplay<'a, Yellow, Self>
Change the foreground color to yellow
Source§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
Change the background color to yellow
Source§fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue<'a>(&'a self) -> FgColorDisplay<'a, Blue, Self>
Change the foreground color to blue
Source§fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue<'a>(&'a self) -> BgColorDisplay<'a, Blue, Self>
Change the background color to blue
Source§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to magenta
Source§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to magenta
Source§fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to purple
Source§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to purple
Source§fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan<'a>(&'a self) -> FgColorDisplay<'a, Cyan, Self>
Change the foreground color to cyan
Source§fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan<'a>(&'a self) -> BgColorDisplay<'a, Cyan, Self>
Change the background color to cyan
Source§fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
fn white<'a>(&'a self) -> FgColorDisplay<'a, White, Self>
Change the foreground color to white
Source§fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white<'a>(&'a self) -> BgColorDisplay<'a, White, Self>
Change the background color to white
Source§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
Change the foreground color to the terminal default
Source§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
Change the background color to the terminal default
Source§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
Change the foreground color to bright black
Source§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
Change the background color to bright black
Source§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
Change the foreground color to bright red
Source§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
Change the background color to bright red
Source§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
Change the foreground color to bright green
Source§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
Change the background color to bright green
Source§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
Change the foreground color to bright yellow
Source§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
Change the background color to bright yellow
Source§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
Change the foreground color to bright blue
Source§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
Change the background color to bright blue
Source§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright magenta
Source§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright magenta
Source§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright purple
Source§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright purple
Source§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
Change the foreground color to bright cyan
Source§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
Change the background color to bright cyan
Source§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
Change the foreground color to bright white
Source§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
Change the background color to bright white
Source§fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
fn bold<'a>(&'a self) -> BoldDisplay<'a, Self>
Make the text bold
Source§fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
fn dimmed<'a>(&'a self) -> DimDisplay<'a, Self>
Make the text dim
Source§fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
fn italic<'a>(&'a self) -> ItalicDisplay<'a, Self>
Make the text italicized
Source§fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
fn underline<'a>(&'a self) -> UnderlineDisplay<'a, Self>
Make the text italicized
Source§fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
fn blink<'a>(&'a self) -> BlinkDisplay<'a, Self>
Make the text blink
Source§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
Make the text blink (but fast!)
Source§fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
fn reversed<'a>(&'a self) -> ReversedDisplay<'a, Self>
Swap the foreground and background colors
Hide the text
Source§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
Cross out the text
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,
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 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,
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 moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
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>
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>
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>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Sets the background color to an RGB value.