macro_rules! plain_text {
    ($fmt:expr) => { ... };
    ($fmt:expr, $($arg:tt)+) => { ... };
}
Expand description

Construct a plain_text Text.

let text = plain_text!("Hello, World!");
let expected = Text::builder()
    .plain_text("Hello, World!")
    .build();

assert_eq!(text, expected);

// You can use this like format! macro.
let greet = "Hi";
let name = "Tanaka";

let text = plain_text!("{greet}, {name}!");
let expected = Text::builder()
    .plain_text("Hi, Tanaka!")
    .build();

assert_eq!(text, expected);