wdl_format/config.rs
1//! Formatting configuration.
2
3mod builder;
4mod indent;
5mod max_line_length;
6
7pub use builder::Builder;
8pub use indent::Indent;
9pub use max_line_length::MaxLineLength;
10
11/// Configuration for formatting.
12#[derive(Clone, Copy, Debug, Default)]
13pub struct Config {
14 /// The indentation configuration.
15 indent: Indent,
16 /// The maximum line length.
17 max_line_length: MaxLineLength,
18}
19
20impl Config {
21 /// Gets the indentation configuration.
22 pub fn indent(&self) -> Indent {
23 self.indent
24 }
25
26 /// Gets the maximum line length of the configuration.
27 pub fn max_line_length(&self) -> Option<usize> {
28 self.max_line_length.get()
29 }
30}