macro_rules! person_hydrations {
(
$vis:vis struct $name:ident {
$(awards $awards_comma:tt)?
$(current_team $current_team_comma:tt)?
$(depth_charts $depth_charts_comma:tt)?
$(draft $draft_comma:tt)?
$(education $education_comma:tt)?
$(jobs $jobs_comma:tt)?
$(nicknames $nicknames_comma:tt)?
$(preferred_team $preferred_team_comma:tt)?
$(relatives $relatives_comma:tt)?
$(roster_entries $roster_entries_comma:tt)?
$(transactions $transactions_comma:tt)?
$(social $social_comma:tt)?
$(stats: $stats:path ,)?
$(xref_id $xref_id_comma:tt)?
}
) => { ... };
}Expand description
Creates hydrations for a person, ex:
person_hydrations! {
pub struct ExampleHydrations { -> pub struct ExampleHydrations {
awards, -> awards: Vec<Award>,
social, -> social: HashMap<String, Vec<String>>,
stats: MyStats, -> stats: MyStats,
} -> }
}The list of valid hydrations are:
awardscurrent_teamdepth_chartsdrafteducationjobsnicknamespreferred_teamrelativesroster_entriestransactionssocialstatsxref_id
Note: these must appear in exactly this order