Skip to main content

punct

Macro punct 

Source
macro_rules! punct {
    () => { ... };
    (value $value:expr) => { ... };
    (pairs $first:expr; $($punctuation:expr => $next:expr),+ $(,)?) => { ... };
    ($value:ty) => { ... };
}
Expand description

Names or constructs a comma-punctuated sequence.

  • punct!(T) names Punctuated<T>.
  • punct!() constructs an empty sequence.
  • punct!(value first) constructs one value.
  • punct!(pairs first; comma => second, ...) constructs a sequence while retaining every supplied typed comma and its span.