Format an error message in red. Use this for error messages, failures, and critical issues. # Arguments `text` - The text to format # Returns A styled object that displays in red when printed. # Example ```rust,ignore eprintln!("{}", colors::error("Failed to read file")); ```
(text: D)
| 209 | /// eprintln!("{}", colors::error("Failed to read file")); |
| 210 | /// ``` |
| 211 | pub fn error<D: std::fmt::Display>(text: D) -> StyledObject<D> { |
| 212 | style(text).red() |
| 213 | } |
| 214 | |
| 215 | /// Format an informational message in cyan. |
| 216 | /// |
no outgoing calls