1 | /// Formatting represent a logic of formatting of a cell. |
2 | #[derive (Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] |
3 | pub struct Formatting { |
4 | /// An setting to allow horizontal trim. |
5 | pub horizontal_trim: bool, |
6 | /// An setting to allow vertical trim. |
7 | pub vertical_trim: bool, |
8 | /// An setting to allow alignment per line. |
9 | pub allow_lines_alignment: bool, |
10 | } |
11 | |
12 | impl Formatting { |
13 | /// Creates a new [`Formatting`] structure. |
14 | pub fn new(horizontal_trim: bool, vertical_trim: bool, allow_lines_alignment: bool) -> Self { |
15 | Self { |
16 | horizontal_trim, |
17 | vertical_trim, |
18 | allow_lines_alignment, |
19 | } |
20 | } |
21 | } |
22 | |