-
-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
Hi, I am wondering, is it technically possible to omit separate macro-calls (as in #9) and inline them into the list of attributes?
#[derive(Serialize, Deserialize)]
struct Match {
#[serde(flatten, with_prefix = "player1_")]
player1: Player,
#[serde(flatten, with_prefix = "player2_")]
player2: Player,
}
#[derive(Serialize, Deserialize)]
struct Player {
name: String,
votes: u64,
}
I'm in the middle of writing a docx-template library, that takes user data and distributes it to a document's {placeholders}
. Things get worse, when you have a lot of keys, so flatten
+with_prefix
would allow avoiding name conflicts.
Metadata
Metadata
Assignees
Labels
No labels