artifacts/
traits.rs

1use crate::models::{CharacterSchema, CooldownSchema};
2
3pub trait GetCooldown {
4    fn get_cooldown(&self) -> &CooldownSchema;
5}
6
7pub trait GetCharacter {
8    fn get_character(&self) -> &CharacterSchema;
9}
10
11pub trait GetCharacters {
12    fn get_characters(&self) -> Vec<CharacterSchema>;
13}
14
15impl<T: GetCharacter + 'static> GetCharacters for T {
16    fn get_characters(&self) -> Vec<CharacterSchema> {
17        vec![self.get_character().clone()]
18    }
19}
20
21pub trait IntoData {
22    type Data;
23    fn into_data(self) -> Self::Data;
24}