Skip to main content

punc

Macro punc 

Source
macro_rules! punc {
    (
        pairs $first:expr;
        $punctuation:expr => $second:expr
        $(, $rest_punctuation:expr => $rest_value:expr)*
        $(,)?
    ) => { ... };
    ($value:ty) => { ... };
}
Expand description

Names or constructs a comma-punctuated sequence.

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