derive

Attribute Macro derive 

Source
#[derive]
Expand description

Invokes a portrait derive macro on the applied type.

§Usage

#[portrait::derive(@OPTION1(...) @OPTION2 path::to::Trait with path::to::derive_filler(...))]
struct Foo {
    // ...
}

The (...) parts are optional arguments passed for the option or the filler. If the option/filler does not expect any arguments, the entire parentheses may be omitted.

§Special options

§DEBUG_PRINT_FILLER_OUTPUT

Syntax: @DEBUG_PRINT_FILLER_OUTPUT

Prints the output of the filler macro, used for filler macro developers to debug their code.

§MOD_PATH

Syntax: @MOD_PATH(path::to::name)

Specifies the derived module path if it is imported differently or overridden with name in #[make].