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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/// The [`def`] macro enables you to use the [default declaration syntax](https://github.com/skytable/bagel#default-declaration-syntax).
///
/// ## Example
/// ```
/// use bagel::def;
///
/// def! {
/// pub struct MyOven {
/// starting_temperature: u8,
/// increment_temp_by: u8 = 1,
/// oven_name: &'static str = "my_kitchen_wifi_oven1",
/// items_to_bake: [&'static str; 4] = [
/// "bagels",
/// "hashbrowns",
/// "cookies",
/// "pie",
/// ],
/// people_buffer: Vec<String> = vec![
/// "one for Jamie".into(),
/// "another for Sophie".into()
/// ],
/// }
/// }
///
/// let mut myoven = MyOven::default();
///
/// assert_eq!(myoven.starting_temperature, 0);
/// assert_eq!(myoven.oven_name, "my_kitchen_wifi_oven1");
/// assert_eq!(myoven.items_to_bake[3], "pie");
/// assert_eq!(myoven.people_buffer.len(), 2);
/// ```
) =>
}
};
}