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

32 lines
796 B
Plaintext
Raw Normal View History

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