Skip to main content

msg_success

Macro msg_success 

Source
macro_rules! msg_success {
    ($msg:expr) => { ... };
    ($msg:expr, true) => { ... };
}
Expand description

Prints a success message with āœ… prefix and automatic routing.

This macro is specifically designed for displaying success notifications and positive confirmations. The green checkmark emoji provides visual confirmation that operations completed successfully.

§Visual Design

  • Prefix: āœ… (green checkmark emoji)
  • Purpose: Success confirmations and positive outcomes
  • Examples: Task creation, configuration saves, successful exports

§Output Examples

āœ… Task created successfully
āœ… Configuration saved successfully
āœ… Data exported to file.csv

§Usage Patterns

§Simple Success Message

use kasl::msg_success;
use kasl::libs::messages::types::Message;

msg_success!(Message::TaskCreated);
// Output: "āœ… Task created successfully"

§Success Message with Line Breaks

use kasl::msg_success;
use kasl::libs::messages::types::Message;

msg_success!(Message::ExportCompleted("data.csv".to_string()), true);
// Output: "\nāœ… Data exported successfully to: data.csv\n"