Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§