Skip to main content

single_stat

Macro single_stat 

Source
macro_rules! single_stat {
    ($stat_type:ident + $stat_group:ident for $person_id:expr) => { ... };
    ($stat_type:ident + $stat_group:ident for $person_id:expr; with |$builder:ident| $builder_expr:expr) => { ... };
}
Expand description

Shorthand function for getting a single [StatType] and [StatGroup] for a specific player.

ยงExamples

let stat = single_stat!(Season + Hitting for 660_271).await.unwrap();
 
// or supply builder params with
let stat = single_stat!(Season + Hitting for 660_271; with |builder| builder.season(2024)).await.unwrap();