Macro lazy_cat::lazy_cat
[−]
[src]
macro_rules! lazy_cat { ($x:expr) => { ... }; ($x:expr, $($y:expr),+) => { ... }; }
Creates a LazyStr from several things that are Display + Sized, consuming them in the process. (Use references or Copy types)
Examples
assert_eq!("Hello world!", lazy_cat!("Hello", " world!").to_string()); assert_eq!("Hello John Doe!", lazy_cat!("Hello ", "John ", "Doe!").to_string()); assert_eq!("123Hello", lazy_cat!(1, 2, 3, "Hello").to_string());