Skip to main content

cheetah_format

Macro cheetah_format 

Source
macro_rules! cheetah_format {
    ($($arg:tt)*) => { ... };
}
Expand description

Creates a CheetahString using format! syntax.

Output of up to 23 bytes is formatted into inline storage without allocating; see CheetahString::from_fmt.

use cheetah_string::cheetah_format;

let (topic, queue_id) = ("orders", 4);
let key = cheetah_format!("{topic}@{queue_id}");
assert_eq!(key, "orders@4");