mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 21:37:54 +02:00
Add #[nu_value(rename = "...")]
as helper attribute on members for derive macros (#13761)
# Description This PR allows the helper attribute `nu_value(rename = "...")` to be used on struct fields and enum variants. This allows renaming keys and variants just like [`#[serde(rename = "name")]`](https://serde.rs/field-attrs.html#rename). This has no singular variants for `IntoValue` or `FromValue`, both need to use the same (but I think this shouldn't be an issue for now). # User-Facing Changes Users of the derive macros `IntoValue` and `FromValue` may now use `#[nu_value(rename = "...")]` to rename single fields, but no already existing code will break.
This commit is contained in:
@ -36,6 +36,7 @@ mod case;
|
||||
mod error;
|
||||
mod from;
|
||||
mod into;
|
||||
mod names;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
|
Reference in New Issue
Block a user