macro_rules! kv_pairs {
($($k:expr_2021 => $v:expr_2021),* $(,)?) => { ... };
}
Expand description
Construct the key value attribute slice using mapping syntax. Example:
assert_eq!(
kv_pairs!("1" => "1", "2" => 2, "3" => 3.0),
&[
key_value!("1", "1"),
key_value!("2", 2),
key_value!("3", 3.0),
],
);