mirror of
https://github.com/TxtDot/dalet.git
synced 2025-03-13 05:14:44 +03:00
feat(rust): abstract tag to daletl
This commit is contained in:
parent
f2a30d0289
commit
3b758d82aa
3 changed files with 164 additions and 28 deletions
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue