join

Macro join 

Source
macro_rules! join {
    (
		{$map:path}
		[
			$(,)? $({$($segment:tt)*} $(,)?)*
		]
	) => { ... };
    (
		[
			$(,)? $({$($segment:tt)*} $(,)?)*
		]
	) => { ... };
}
Expand description

Joins segments together.

Optionally, a mapping macro can be provided to transform the whole resulting joined token group.

join! {
	[{foo}, {bar}, {baz}]
}

// Expands to:
// foo bar baz

With mapping macro:

macro_rules! wrap_in_parens {
	($($tokens:tt)*) => {
		( $($tokens)* )
	};
}

join! {
	{wrap_in_parens}
	[{foo}, {bar}, {baz}]
}

// Expands to:
// ( foo bar baz )