mirror of https://github.com/MingweiSamuel/Riven
30 lines
649 B
Plaintext
30 lines
649 B
Plaintext
|
{{
|
||
|
const dotUtils = require('./dotUtils.js');
|
||
|
const queues = require('./.queues.json');
|
||
|
}}{{= dotUtils.preamble() }}
|
||
|
|
||
|
use serde::{ Serialize, Deserialize };
|
||
|
|
||
|
newtype_enum! {
|
||
|
/// A League of Legends matchmaking queue.
|
||
|
#[derive(Serialize, Deserialize)]
|
||
|
#[serde(transparent)]
|
||
|
pub newtype_enum Queue(u16) {
|
||
|
{{
|
||
|
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'] }},
|
||
|
{{
|
||
|
}
|
||
|
}}
|
||
|
}
|
||
|
}
|