enum_dispatch/
enum_dispatch_arg_list.rs

1//! Provides an implementation of a `syn`- and `quote`-compatible syntax item describing the
2//! list of arguments that can be passed to an `#[enum_dispatch(...)]` attribute.
3
4pub struct EnumDispatchArgList {
5    pub arg_list: syn::punctuated::Punctuated<syn::Path, syn::token::Comma>,
6}
7
8impl syn::parse::Parse for EnumDispatchArgList {
9    fn parse(input: &syn::parse::ParseBuffer) -> Result<Self, syn::Error> {
10        let arg_list = syn::punctuated::Punctuated::parse_terminated(input)?;
11        Ok(Self { arg_list })
12    }
13}