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