1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::api::{categories::CategoryId, games::GameId, runs::RunId};

use super::Run;

impl<'a> From<Run<'a>> for RunId<'a> {
    fn from(value: Run<'a>) -> Self {
        value.id
    }
}

impl<'a> From<Run<'a>> for GameId<'a> {
    fn from(value: Run<'a>) -> Self {
        value.game
    }
}

impl<'a> From<Run<'a>> for CategoryId<'a> {
    fn from(value: Run<'a>) -> Self {
        value.category
    }
}