trace_macros::connect_args!
[−]
[src]
macro_rules! connect_args { (formatter=>$fr:expr, sep=>$sep:expr, $($arg:expr),+) => { [$(format!($fr, $arg),)+].connect($sep) }; (sep=>$sep:expr, $($arg:expr),+) => { [$(format!("{}", $arg),)+].connect($sep) }; (formatter=>$fr:expr, $($arg:expr),+) => { [$(format!($fr, $arg),)+].connect(" ") }; ($msg:expr) => { format!("{}", $msg) }; ($($arg:expr),+) => { [$(format!("{}", $arg),)+].connect(" ") }; }
Macro to concat several arguments into one string.
Arguments:
sep
is a string which is used to separate arguments. Default is white-space.formatter
is a valid string to pass informat!
. Default is"{}"
.
Usage:
connect_args!(formatter=>[String], sep=>[String], [arg1, arg2, ..., argN])
connect_args!(sep=>[String], [arg1, arg2, ..., argN])
connect_args!(formatter=>[String], [arg1, arg2, ..., argN])
connect_args!([arg1, arg2, ..., argN])