forked from mirror/Riven
1
0
Fork 0
Riven/srcgen/consts/queue.rs.dt

32 lines
762 B
Plaintext

{{
const dotUtils = require('./dotUtils.js');
const queues = require('./.queues.json');
}}{{= dotUtils.preamble() }}
use serde_repr::{ Serialize_repr, Deserialize_repr };
use num_enum::{ IntoPrimitive, TryFromPrimitive };
/// League of Legends matchmaking queue.
#[non_exhaustive]
#[derive(Debug, Copy, Clone)]
#[derive(Eq, PartialEq)]
#[derive(Serialize_repr, Deserialize_repr)]
#[derive(IntoPrimitive, TryFromPrimitive)]
#[repr(u16)]
pub enum Queue {
{{
for (const e of queues) {
const desc = e['x-desc'] ? e['x-desc'].split('\n') : [];
}}
{{~ desc :line }}
/// {{= line }}
{{~}}
{{? e['x-deprecated'] }}
/// {{= e.notes }}
#[deprecated(note="{{= e.notes }}")]
{{?}}
{{= e['x-name'] }} = {{= e['x-value'] }},
{{
}
}}
}