speedrun_api/types/
run_impls.rs

1use crate::api::{categories::CategoryId, games::GameId, runs::RunId};
2
3use super::Run;
4
5impl<'a> From<Run<'a>> for RunId<'a> {
6    fn from(value: Run<'a>) -> Self {
7        value.id
8    }
9}
10
11impl<'a> From<Run<'a>> for GameId<'a> {
12    fn from(value: Run<'a>) -> Self {
13        value.game
14    }
15}
16
17impl<'a> From<Run<'a>> for CategoryId<'a> {
18    fn from(value: Run<'a>) -> Self {
19        value.category
20    }
21}