feat(rust): abstract tag to daletl

This commit is contained in:
Artemy Egorov 2024-08-01 18:22:40 +03:00
parent f2a30d0289
commit 3b758d82aa
3 changed files with 164 additions and 28 deletions

View file

@ -17,6 +17,10 @@ impl Tag {
}
}
pub fn t_new(id: Tid, body: Body, argument: Argument) -> Tag {
Tag::new(id, body, argument)
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(untagged)]
pub enum Body {
@ -29,7 +33,7 @@ pub enum Body {
#[serde(untagged)]
pub enum Argument {
Text(String),
Number(i8),
Number(u8),
Null,
}