Enum nu_protocol::ShellError
source · [−]pub enum ShellError {
Show 70 variants
OperatorMismatch {
op_span: Span,
lhs_ty: Type,
lhs_span: Span,
rhs_ty: Type,
rhs_span: Span,
},
OperatorOverflow(String, Span),
PipelineMismatch(String, Span, Span),
TypeMismatch(String, Span),
UnsupportedOperator(Operator, Span),
UnknownOperator(String, Span),
MissingParameter(String, Span),
IncompatibleParameters {
left_message: String,
left_span: Span,
right_message: String,
right_span: Span,
},
DelimiterError(String, Span),
IncompatibleParametersSingle(String, Span),
FeatureNotEnabled(Span),
ExternalNotSupported(Span),
InvalidProbability(Span),
InvalidRange(String, String, Span),
NushellFailed(String),
NushellFailedSpanned(String, String, Span),
NushellFailedHelp(String, String),
NushellFailedSpannedHelp(String, String, Span, String),
VariableNotFoundAtRuntime(Span),
EnvVarNotFoundAtRuntime(String, Span),
ModuleNotFoundAtRuntime(String, Span),
ModuleOrOverlayNotFoundAtRuntime(String, Span),
OverlayNotFoundAtRuntime(String, Span),
NotFound(Span),
CantConvert(String, String, Span, Option<String>),
EnvVarNotAString(String, Span),
DivisionByZero(Span),
CannotCreateRange(Span),
AccessBeyondEnd(usize, Span),
AccessBeyondEndOfStream(Span),
IncompatiblePathAccess(String, Span),
CantFindColumn(Span, Span),
ColumnAlreadyExists(Span, Span),
NotAList(Span, Span),
ExternalCommand(String, String, Span),
UnsupportedInput(String, Span),
DatetimeParseError(Span),
NetworkFailure(String, Span),
CommandNotFound(Span),
FlagNotFound(String, Span),
FileNotFound(Span),
FileNotFoundCustom(String, Span),
PluginFailedToLoad(String),
PluginFailedToEncode(String),
PluginFailedToDecode(String),
IOError(String),
NotADirectory(Span),
DirectoryNotFound(Span, Option<String>),
DirectoryNotFoundCustom(String, Span),
MoveNotPossible {
source_message: String,
source_span: Span,
destination_message: String,
destination_span: Span,
},
MoveNotPossibleSingle(String, Span),
CreateNotPossible(String, Span),
ChangeAccessTimeNotPossible(String, Span),
ChangeModifiedTimeNotPossible(String, Span),
RemoveNotPossible(String, Span),
NoFileToBeRemoved(),
NoFileToBeMoved(),
NoFileToBeCopied(),
ReadingFile(String, Span),
DidYouMean(String, Span),
NonUtf8(Span),
DowncastNotPossible(String, Span),
UnsupportedConfigValue(String, String, Span),
MissingConfigValue(String, Span),
NeedsPositiveValue(Span),
GenericError(String, String, Option<Span>, Option<String>, Vec<ShellError>),
OutsideSpannedLabeledError(String, String, String, Span),
DeprecatedCommand(String, String, Span),
NonUnicodeInput,
UnexpectedAbbrComponent(String),
}
Expand description
The fundamental error type for the evaluation engine. These cases represent different kinds of errors the evaluator might face, along with helpful spans to label. An error renderer will take this error value and pass it into an error viewer to display to the user.
Variants
OperatorMismatch
An operator received two arguments of incompatible types.
Resolution
Check each argument’s type and convert one or both as needed.
OperatorOverflow(String, Span)
An arithmetic operation’s resulting value overflowed its possible size.
Resolution
Check the inputs to the operation and add guards for their sizes. Integers are generally of size i64, floats are generally f64.
PipelineMismatch(String, Span, Span)
The pipelined input into a command was not of the expected type. For example, it might expect a string input, but received a table instead.
Resolution
Check the relevant pipeline and extract or convert values as needed.
TypeMismatch(String, Span)
A command received an argument of the wrong type.
Resolution
Convert the argument type before passing it in, or change the command to accept the type.
UnsupportedOperator(Operator, Span)
This value cannot be used with this operator.
Resolution
Not all values, for example custom values, can be used with all operators. Either implement support for the operator on this type, or convert the type to a supported one.
UnknownOperator(String, Span)
MissingParameter(String, Span)
IncompatibleParameters
Two parameters conflict with each other or are otherwise mutually exclusive.
Resolution
Remove one of the parameters/options and try again.
DelimiterError(String, Span)
There’s some issue with number or matching of delimiters in an expression.
Resolution
Check your syntax for mismatched braces, RegExp syntax errors, etc, based on the specific error message.
IncompatibleParametersSingle(String, Span)
An operation received parameters with some sort of incompatibility (for example, different number of rows in a table, incompatible column names, etc).
Resolution
Refer to the specific error message for details on what’s incompatible and then fix your inputs to make sure they match that way.
FeatureNotEnabled(Span)
This build of nushell implements this feature, but it has not been enabled.
Resolution
Rebuild nushell with the appropriate feature enabled.
ExternalNotSupported(Span)
You’re trying to run an unsupported external command.
Resolution
Make sure there’s an appropriate run-external
declaration for this external command.
InvalidProbability(Span)
The given probability input is invalid. The probability must be between 0 and 1.
Resolution
Make sure the probability is between 0 and 1 and try again.
InvalidRange(String, String, Span)
The first value in a ..
range must be compatible with the second one.
Resolution
Check to make sure both values are compatible, and that the values are enumerable in Nushell.
NushellFailed(String)
Catastrophic nushell failure. This reflects a completely unexpected or unrecoverable error.
Resolution
It is very likely that this is a bug. Please file an issue at https://github.com/nushell/nushell/issues with relevant information.
NushellFailedSpanned(String, String, Span)
Catastrophic nushell failure. This reflects a completely unexpected or unrecoverable error.
Resolution
It is very likely that this is a bug. Please file an issue at https://github.com/nushell/nushell/issues with relevant information.
NushellFailedHelp(String, String)
Catastrophic nushell failure. This reflects a completely unexpected or unrecoverable error.
Resolution
It is very likely that this is a bug. Please file an issue at https://github.com/nushell/nushell/issues with relevant information.
NushellFailedSpannedHelp(String, String, Span, String)
Catastrophic nushell failure. This reflects a completely unexpected or unrecoverable error.
Resolution
It is very likely that this is a bug. Please file an issue at https://github.com/nushell/nushell/issues with relevant information.
VariableNotFoundAtRuntime(Span)
A referenced variable was not found at runtime.
Resolution
Check the variable name. Did you typo it? Did you forget to declare it? Is the casing right?
EnvVarNotFoundAtRuntime(String, Span)
A referenced environment variable was not found at runtime.
Resolution
Check the environment variable name. Did you typo it? Did you forget to declare it? Is the casing right?
ModuleNotFoundAtRuntime(String, Span)
A referenced module was not found at runtime.
Resolution
Check the module name. Did you typo it? Did you forget to declare it? Is the casing right?
ModuleOrOverlayNotFoundAtRuntime(String, Span)
A referenced module or overlay was not found at runtime.
Resolution
Check the module name. Did you typo it? Did you forget to declare it? Is the casing right?
OverlayNotFoundAtRuntime(String, Span)
A referenced overlay was not found at runtime.
Resolution
Check the overlay name. Did you typo it? Did you forget to declare it? Is the casing right?
NotFound(Span)
The given item was not found. This is a fairly generic error that depends on context.
Resolution
This error is triggered in various places, and simply signals that “something” was not found. Refer to the specific error message for further details.
CantConvert(String, String, Span, Option<String>)
Failed to convert a value of one type into a different type.
Resolution
Not all values can be coerced this way. Check the supported type(s) and try again.
EnvVarNotAString(String, Span)
An environment variable cannot be represented as a string.
Resolution
Not all types can be converted to environment variable values, which must be strings. Check the input type and try again.
DivisionByZero(Span)
Division by zero is not a thing.
Resolution
Add a guard of some sort to check whether a denominator input to this division is zero, and branch off if that’s the case.
CannotCreateRange(Span)
An error happened while tryin to create a range.
This can happen in various unexpected situations, for example if the range would loop forever (as would be the case with a 0-increment).
Resolution
Check your range values to make sure they’re countable and would not loop forever.
AccessBeyondEnd(usize, Span)
You attempted to access an index beyond the available length of a value.
Resolution
Check your lengths and try again.
AccessBeyondEndOfStream(Span)
You attempted to access an index beyond the available length of a stream.
Resolution
Check your lengths and try again.
IncompatiblePathAccess(String, Span)
Tried to index into a type that does not support pathed access.
Resolution
Check your types. Only composite types can be pathed into.
CantFindColumn(Span, Span)
The requested column does not exist.
Resolution
Check the spelling of your column name. Did you forget to rename a column somewhere?
ColumnAlreadyExists(Span, Span)
Attempted to insert a column into a table, but a column with that name already exists.
Resolution
Drop or rename the existing column (check rename -h
) and try again.
NotAList(Span, Span)
The given operation can only be performed on lists.
Resolution
Check the input type to this command. Are you sure it’s a list?
ExternalCommand(String, String, Span)
An error happened while performing an external command.
Resolution
This error is fairly generic. Refer to the specific error message for further details.
UnsupportedInput(String, Span)
An operation was attempted with an input unsupported for some reason.
Resolution
This error is fairly generic. Refer to the specific error message for further details.
DatetimeParseError(Span)
Failed to parse an input into a datetime value.
Resolution
Make sure your datetime input format is correct.
For example, these are some valid formats:
- “5 pm”
- “2020/12/4”
- “2020.12.04 22:10 +2”
- “2020-04-12 22:10:57 +02:00”
- “2020-04-12T22:10:57.213231+02:00”
- “Tue, 1 Jul 2003 10:52:37 +0200”“#
NetworkFailure(String, Span)
CommandNotFound(Span)
Help text for this command could not be found.
Resolution
Check the spelling for the requested command and try again. Are you sure it’s defined and your configurations are loading correctly? Can you execute it?
FlagNotFound(String, Span)
A flag was not found.
FileNotFound(Span)
Failed to find a file during a nushell operation.
Resolution
Does the file in the error message exist? Is it readable and accessible? Is the casing right?
FileNotFoundCustom(String, Span)
Failed to find a file during a nushell operation.
Resolution
Does the file in the error message exist? Is it readable and accessible? Is the casing right?
PluginFailedToLoad(String)
A plugin failed to load.
Resolution
This is a failry generic error. Refer to the specific error message for further details.
PluginFailedToEncode(String)
PluginFailedToDecode(String)
A message to a plugin failed to decode.
Resolution
This is either an issue with the inputs to a plugin (bad JSON?) or a bug in the plugin itself. Fix or report as appropriate.
IOError(String)
An I/O operation failed.
Resolution
This is a generic error. Refer to the specific error message for further details.
NotADirectory(Span)
Tried to cd
to a path that isn’t a directory.
Resolution
Make sure the path is a directory. It currently exists, but is of some other type, like a file.
DirectoryNotFound(Span, Option<String>)
Attempted to perform an operation on a directory that doesn’t exist.
Resolution
Make sure the directory in the error message actually exists before trying again.
DirectoryNotFoundCustom(String, Span)
Attempted to perform an operation on a directory that doesn’t exist.
Resolution
Make sure the directory in the error message actually exists before trying again.
MoveNotPossible
The requested move operation cannot be completed. This is typically because both paths exist, but are of different types. For example, you might be trying to overwrite an existing file with a directory.
Resolution
Make sure the destination path does not exist before moving a directory.
MoveNotPossibleSingle(String, Span)
The requested move operation cannot be completed. This is typically because both paths exist, but are of different types. For example, you might be trying to overwrite an existing file with a directory.
Resolution
Make sure the destination path does not exist before moving a directory.
CreateNotPossible(String, Span)
Failed to create either a file or directory.
Resolution
This is a fairly generic error. Refer to the specific error message for further details.
ChangeAccessTimeNotPossible(String, Span)
Changing the access time (“atime”) of this file is not possible.
Resolution
This can be for various reasons, such as your platform or permission flags. Refer to the specific error message for more details.
ChangeModifiedTimeNotPossible(String, Span)
Changing the modification time (“mtime”) of this file is not possible.
Resolution
This can be for various reasons, such as your platform or permission flags. Refer to the specific error message for more details.
RemoveNotPossible(String, Span)
Unable to remove this item.
NoFileToBeRemoved()
NoFileToBeMoved()
NoFileToBeCopied()
ReadingFile(String, Span)
DidYouMean(String, Span)
A name was not found. Did you mean a different name?
Resolution
The error message will suggest a possible match for what you meant.
NonUtf8(Span)
The given input must be valid UTF-8 for further processing.
Resolution
Check your input’s encoding. Are there any funny characters/bytes?
DowncastNotPossible(String, Span)
A custom value could not be converted to a Dataframe.
Resolution
Make sure conversion to a Dataframe is possible for this value or convert it to a type that does, first.
UnsupportedConfigValue(String, String, Span)
The value given for this configuration is not supported.
Resolution
Refer to the specific error message for details and convert values as needed.
MissingConfigValue(String, Span)
An expected configuration value is not present.
Resolution
Refer to the specific error message and add the configuration value to your config file as needed.
NeedsPositiveValue(Span)
Negative value passed when positive ons is required.
Resolution
Guard against negative values or check your inputs.
GenericError(String, String, Option<Span>, Option<String>, Vec<ShellError>)
This is a generic error type used for different situations.
OutsideSpannedLabeledError(String, String, String, Span)
This is a generic error type used for different situations.
DeprecatedCommand(String, String, Span)
Attempted to use a deprecated command.
Resolution
Check the help for the new suggested command and update your script accordingly.
NonUnicodeInput
UnexpectedAbbrComponent(String)
Trait Implementations
sourceimpl Clone for ShellError
impl Clone for ShellError
sourcefn clone(&self) -> ShellError
fn clone(&self) -> ShellError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ShellError
impl Debug for ShellError
sourceimpl<'de> Deserialize<'de> for ShellError
impl<'de> Deserialize<'de> for ShellError
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Diagnostic for ShellError
impl Diagnostic for ShellError
sourcefn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Unique diagnostic code that can be used to look up more information
about this Diagnostic
. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or enums will work just fine. Read more
sourcefn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Additional help text related to this Diagnostic
. Do you have any
advice for the poor soul who’s just run into this issue? Read more
sourcefn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>>>
Labels to apply to this Diagnostic
’s Diagnostic::source_code
sourcefn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Source code to apply this Diagnostic
’s Diagnostic::labels
to.
Additional related Diagnostic
s.
sourcefn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
URL to visit for a more detailed explanation/help about this
Diagnostic
. Read more
sourcefn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
Diagnostic severity. This may be used by
ReportHandler
s to change the display format
of this diagnostic. Read more
sourcefn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
The cause of the error.
sourceimpl Display for ShellError
impl Display for ShellError
sourceimpl Error for ShellError
impl Error for ShellError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Box<dyn Error + 'static, Global>> for ShellError
impl From<Box<dyn Error + 'static, Global>> for ShellError
sourcefn from(input: Box<dyn Error>) -> ShellError
fn from(input: Box<dyn Error>) -> ShellError
Converts to this type from the input type.
sourceimpl From<Error> for ShellError
impl From<Error> for ShellError
sourcefn from(input: Error) -> ShellError
fn from(input: Error) -> ShellError
Converts to this type from the input type.
sourceimpl Serialize for ShellError
impl Serialize for ShellError
Auto Trait Implementations
impl RefUnwindSafe for ShellError
impl Send for ShellError
impl Sync for ShellError
impl Unpin for ShellError
impl UnwindSafe for ShellError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<D> OwoColorize for D
impl<D> OwoColorize for D
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
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
fn black(&'a self) -> FgColorDisplay<'a, Black, Self>
fn black(&'a self) -> FgColorDisplay<'a, Black, Self>
Change the foreground color to black
fn on_black(&'a self) -> BgColorDisplay<'a, Black, Self>
fn on_black(&'a self) -> BgColorDisplay<'a, Black, Self>
Change the background color to black
fn red(&'a self) -> FgColorDisplay<'a, Red, Self>
fn red(&'a self) -> FgColorDisplay<'a, Red, Self>
Change the foreground color to red
fn on_red(&'a self) -> BgColorDisplay<'a, Red, Self>
fn on_red(&'a self) -> BgColorDisplay<'a, Red, Self>
Change the background color to red
fn green(&'a self) -> FgColorDisplay<'a, Green, Self>
fn green(&'a self) -> FgColorDisplay<'a, Green, Self>
Change the foreground color to green
fn on_green(&'a self) -> BgColorDisplay<'a, Green, Self>
fn on_green(&'a self) -> BgColorDisplay<'a, Green, Self>
Change the background color to green
fn yellow(&'a self) -> FgColorDisplay<'a, Yellow, Self>
fn yellow(&'a self) -> FgColorDisplay<'a, Yellow, Self>
Change the foreground color to yellow
fn on_yellow(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow(&'a self) -> BgColorDisplay<'a, Yellow, Self>
Change the background color to yellow
fn blue(&'a self) -> FgColorDisplay<'a, Blue, Self>
fn blue(&'a self) -> FgColorDisplay<'a, Blue, Self>
Change the foreground color to blue
fn on_blue(&'a self) -> BgColorDisplay<'a, Blue, Self>
fn on_blue(&'a self) -> BgColorDisplay<'a, Blue, Self>
Change the background color to blue
fn magenta(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to magenta
fn on_magenta(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to magenta
fn purple(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn purple(&'a self) -> FgColorDisplay<'a, Magenta, Self>
Change the foreground color to purple
fn on_purple(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple(&'a self) -> BgColorDisplay<'a, Magenta, Self>
Change the background color to purple
fn cyan(&'a self) -> FgColorDisplay<'a, Cyan, Self>
fn cyan(&'a self) -> FgColorDisplay<'a, Cyan, Self>
Change the foreground color to cyan
fn on_cyan(&'a self) -> BgColorDisplay<'a, Cyan, Self>
fn on_cyan(&'a self) -> BgColorDisplay<'a, Cyan, Self>
Change the background color to cyan
fn white(&'a self) -> FgColorDisplay<'a, White, Self>
fn white(&'a self) -> FgColorDisplay<'a, White, Self>
Change the foreground color to white
fn on_white(&'a self) -> BgColorDisplay<'a, White, Self>
fn on_white(&'a self) -> BgColorDisplay<'a, White, Self>
Change the background color to white
fn default_color(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color(&'a self) -> FgColorDisplay<'a, Default, Self>
Change the foreground color to the terminal default
fn on_default_color(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color(&'a self) -> BgColorDisplay<'a, Default, Self>
Change the background color to the terminal default
fn bright_black(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
Change the foreground color to bright black
fn on_bright_black(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
Change the background color to bright black
fn bright_red(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
Change the foreground color to bright red
fn on_bright_red(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
Change the background color to bright red
fn bright_green(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
Change the foreground color to bright green
fn on_bright_green(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
Change the background color to bright green
fn bright_yellow(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
Change the foreground color to bright yellow
fn on_bright_yellow(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
Change the background color to bright yellow
fn bright_blue(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
Change the foreground color to bright blue
fn on_bright_blue(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
Change the background color to bright blue
fn bright_magenta(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright magenta
fn on_bright_magenta(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright magenta
fn bright_purple(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
Change the foreground color to bright purple
fn on_bright_purple(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
Change the background color to bright purple
fn bright_cyan(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
Change the foreground color to bright cyan
fn on_bright_cyan(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
Change the background color to bright cyan
fn bright_white(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
Change the foreground color to bright white
fn on_bright_white(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
Change the background color to bright white
fn bold(&'a self) -> BoldDisplay<'a, Self>
fn bold(&'a self) -> BoldDisplay<'a, Self>
Make the text bold
fn dimmed(&'a self) -> DimDisplay<'a, Self>
fn dimmed(&'a self) -> DimDisplay<'a, Self>
Make the text dim
fn italic(&'a self) -> ItalicDisplay<'a, Self>
fn italic(&'a self) -> ItalicDisplay<'a, Self>
Make the text italicized
fn underline(&'a self) -> UnderlineDisplay<'a, Self>
fn underline(&'a self) -> UnderlineDisplay<'a, Self>
Make the text italicized
fn blink(&'a self) -> BlinkDisplay<'a, Self>
fn blink(&'a self) -> BlinkDisplay<'a, Self>
Make the text blink
fn blink_fast(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast(&'a self) -> BlinkFastDisplay<'a, Self>
Make the text blink (but fast!)
fn reversed(&'a self) -> ReversedDisplay<'a, Self>
fn reversed(&'a self) -> ReversedDisplay<'a, Self>
Swap the foreground and background colors
Hide the text
fn strikethrough(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough(&'a self) -> StrikeThroughDisplay<'a, Self>
Cross out the text
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 more
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 more
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.
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.
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.
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.