blob: 4d06a1f31fe0325e21642876b160694cfc3f1586 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*
This file is part of jellything (https://codeberg.org/metamuffin/jellything)
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
use jellyobject::{OBB, Object, fields};
fields! {
NAME: str = b"name";
AGE: u32 = b"age1";
FRIEND: str = b"frnd";
}
pub(crate) fn new_bob() -> Box<Object> {
OBB::new()
.with(NAME, "Bob")
.with(AGE, 35)
.with(FRIEND, "Alice")
.with(FRIEND, "Charlie")
.finish()
}
pub(crate) fn new_alice() -> Box<Object> {
OBB::new()
.with(NAME, "Alice")
.with(AGE, 31)
.with(FRIEND, "Bob")
.finish()
}
pub(crate) fn new_charlie() -> Box<Object> {
OBB::new()
.with(NAME, "Charlie")
.with(AGE, 31)
.with(FRIEND, "Bob")
.finish()
}
|