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
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd, Eq, Ord)]
pub enum Side {
Top,
Bottom,
Left,
Right,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, PartialOrd, Eq, Ord)]
pub struct Gutter {
pub side: Side,
pub value: i32,
pub output: Option<String>,
pub id: Option<usize>,
}
impl Gutter {
#[must_use]
pub const fn new(side: Side, value: i32, output: Option<String>, id: Option<usize>) -> Self {
Self {
side,
value,
output,
id,
}
}
}
impl Default for Gutter {
fn default() -> Self {
Self {
side: Side::Top,
value: 0,
output: None,
id: None,
}
}
}