#[derive]Expand description
Apply derive macros re-exported by rustmax.
Derive macros generate code that names their own crate,
which does not resolve when that crate is reached through rustmax
instead of being a direct dependency.
This attribute rewrites the derive paths
and injects whatever each derive crate needs to find its runtime.
#[rmx::derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase")]
struct Config {
some_field: u32,
}Unrecognized names are passed through unchanged,
so built-in derives like Clone and Debug
can be listed alongside re-exported ones.
See Macros in the guide.
Apply derive macros re-exported by rustmax.
Most derive macros generate code that names their own crate, which
fails when the crate is reached through rustmax instead of being a
direct dependency. This attribute rewrites the derive paths and injects
whatever each derive crate needs to find its runtime.
#[rmx::derive(Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase")]
struct Config {
some_field: u32,
}Names it does not recognize are passed through to #[derive(..)]
unchanged, so built-in and third-party derives can be listed alongside.