pub struct IndentationManager {
pub indent_stack: Vec<usize>,
pub indentation_style: IndentationStyle,
pub current_indent: usize,
pattern_analyzed: bool,
}Expand description
Indentation manager for tracking YAML indentation levels
Fields§
§indent_stack: Vec<usize>Stack of indentation levels
indentation_style: IndentationStyleDetected indentation style
current_indent: usizeCurrent indentation level
pattern_analyzed: boolWhether we’ve analyzed the indentation pattern
Implementations§
Source§impl IndentationManager
impl IndentationManager
Sourcepub fn push_indent(&mut self, level: usize)
pub fn push_indent(&mut self, level: usize)
Push a new indentation level
Sourcepub fn pop_indent(&mut self) -> Option<usize>
pub fn pop_indent(&mut self) -> Option<usize>
Pop an indentation level
Sourcepub fn current_level(&self) -> usize
pub fn current_level(&self) -> usize
Get the current indentation level
Sourcepub fn count_dedents(&self, column: usize) -> usize
pub fn count_dedents(&self, column: usize) -> usize
Count dedent levels needed
Sourcepub fn analyze_pattern(&mut self, line: &str) -> IndentationStyle
pub fn analyze_pattern(&mut self, line: &str) -> IndentationStyle
Analyze indentation pattern from a line
Trait Implementations§
Source§impl Debug for IndentationManager
impl Debug for IndentationManager
Auto Trait Implementations§
impl Freeze for IndentationManager
impl RefUnwindSafe for IndentationManager
impl Send for IndentationManager
impl Sync for IndentationManager
impl Unpin for IndentationManager
impl UnwindSafe for IndentationManager
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