use newtypes for template ids, pros: 1) enforces id validation 2) ease of use (helper method for getting template struct right away)
11 lines
241 B
Rust
11 lines
241 B
Rust
use serde::Deserialize;
|
|
|
|
template_id!(UnlockConfig i32 id);
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
#[serde(rename_all = "PascalCase")]
|
|
pub struct UnlockConfigTemplate {
|
|
#[serde(rename = "ID")]
|
|
pub id: UnlockConfigID,
|
|
pub name: String,
|
|
}
|