feat(protocols): Add more control over gathering additional information (#180)

* protocols: Add more control over gathering additional information

Adds GatherToggle which allows choosing the behaviour for how the query
handles fetching additional information. The choices are:
- DontGather - Don't attempt to fetch information
- AttemptGather - Try to fetch the information but ignore errors
- Required - Try to fetch information and fail if it errors

A handy macro was also added to utils to dispatch additional queries
based on a GatherToggle value.

* Add/Update badge

* protocols: Improve GatherToggle enum names

Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
Co-Authored-By: CosminPerRam <cosmin.p@live.com>

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Cain <75994858+cainthebest@users.noreply.github.com>
Co-authored-by: CosminPerRam <cosmin.p@live.com>
This commit is contained in:
Tom 2024-01-22 11:36:17 +00:00 committed by GitHub
parent 6d0c25d6ea
commit 89ed19f089
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 195 additions and 64 deletions

View file

@ -17,8 +17,8 @@ game_query_mod!(
Engine::new(203_290),
27020,
GatheringSettings {
players: true,
rules: false,
players: GatherToggle::Enforce,
rules: GatherToggle::Skip,
check_app_id: true,
}
);
@ -53,8 +53,8 @@ game_query_mod!(
Engine::new(440_900),
27015,
GatheringSettings {
players: false,
rules: true,
players: GatherToggle::Skip,
rules: GatherToggle::Enforce,
check_app_id: true,
}
);
@ -142,8 +142,8 @@ game_query_mod!(
Engine::new(892_970),
2457,
GatheringSettings {
players: true,
rules: false,
players: GatherToggle::Enforce,
rules: GatherToggle::Skip,
check_app_id: true,
}
);