Trait proc_macro_kwargs::args::MacroKeywordArgs

source ·
pub trait MacroKeywordArgs: MacroArg + Parse {
    type ArgId: KeywordArgId;
    type ParsedArg: ParsedArgValue<Self::ArgId>;

    // Required method
    fn from_keyword_args(
        kwargs: ParsedKeywordArguments<Self>
    ) -> Result<Self, Error>;
}
Expand description

The whole point.

Defines the interface for parsing keyword args.

A set of argument can itself be nested as a MacroArg, provided it is wrapped in braces { }

Required Associated Types§

source

type ArgId: KeywordArgId

The id of an argument.

source

type ParsedArg: ParsedArgValue<Self::ArgId>

The runtime value of a parsed argument

Required Methods§

source

fn from_keyword_args( kwargs: ParsedKeywordArguments<Self> ) -> Result<Self, Error>

Create the parsed arguments struct from its list of arguments

Object Safety§

This trait is not object safe.

Implementors§