pub struct FormatConfig {
pub less_parentheses: bool,
pub max_line_length: usize,
pub indent_long_lines: bool,
pub max_inline_refs: Option<usize>,
pub group_consecutive: bool,
pub indent_string: String,
pub prefer_inline: bool,
}Expand description
FormatConfig for Lino notation formatting.
Provides configuration options for controlling how Link objects are formatted.
Fields§
§less_parentheses: boolIf true, omit parentheses where safe (default: false)
max_line_length: usizeMaximum line length before auto-indenting (default: 80)
indent_long_lines: boolIf true, indent lines exceeding max_line_length (default: false)
max_inline_refs: Option<usize>Maximum number of references before auto-indenting (default: None = unlimited)
group_consecutive: boolIf true, group consecutive links with same ID (default: false)
indent_string: StringString to use for indentation (default: “ “ = two spaces)
prefer_inline: boolIf true, prefer inline format when under thresholds (default: true)
Implementations§
Source§impl FormatConfig
impl FormatConfig
Sourcepub fn builder() -> FormatConfigBuilder
pub fn builder() -> FormatConfigBuilder
Create a new FormatConfig with custom values using builder pattern
Sourcepub fn should_indent_by_length(&self, line: &str) -> bool
pub fn should_indent_by_length(&self, line: &str) -> bool
Trait Implementations§
Source§impl Clone for FormatConfig
impl Clone for FormatConfig
Source§fn clone(&self) -> FormatConfig
fn clone(&self) -> FormatConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatConfig
impl Debug for FormatConfig
Auto Trait Implementations§
impl Freeze for FormatConfig
impl RefUnwindSafe for FormatConfig
impl Send for FormatConfig
impl Sync for FormatConfig
impl Unpin for FormatConfig
impl UnwindSafe for FormatConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more