1#[derive(Debug, Default, Clone)]
2pub enum Align {
3 #[default]
4 Left,
5 Right,
6}
7
8#[derive(Debug, Clone)]
9pub struct Style {
10 pub align: Align,
11
12 pub indent: usize,
13
14 pub padding_char: char,
15
16 pub wrap_width: usize,
17
18 pub row_spacing: usize,
19
20 pub line_spacing: usize,
21
22 pub block_spacing: usize,
23}
24
25impl Default for Style {
26 fn default() -> Self {
27 Self {
28 align: Align::default(),
29 indent: 2,
30 padding_char: ' ',
31 wrap_width: 0,
32 row_spacing: 4,
33 line_spacing: 0,
34 block_spacing: 1,
35 }
36 }
37}
38
39impl Style {
40 pub fn take(&mut self) -> Self {
41 std::mem::take(self)
42 }
43}