error_message
Styled error message component for terminal output.
struct Component
pub struct ComponentA themed error message that renders as ERROR <message> with the label
styled according to the active Theme.
| Field | Type | Description |
|---|---|---|
message |
String | Message text shown after the ERROR label, unstyled. |
Implements Display.
Component::new
pub fn new(message: impl Into<String>) -> SelfCreate a new error message from any string-like value.
| Parameter | Type | Description |
|---|---|---|
message |
impl Into<String> | the error text |
| returns | Self | The message; the theme is read when it is displayed. |