error_message

Styled error message component for terminal output.

struct Component

source

pub struct Component

A 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

source

pub fn new(message: impl Into<String>) -> Self

Create 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.