pub struct ParserState { /* private fields */ }Implementations§
Source§impl ParserState
impl ParserState
pub fn new() -> Self
pub fn set_base_indentation(&self, indent: usize)
pub fn get_base_indentation(&self) -> usize
pub fn normalize_indentation(&self, indent: usize) -> usize
pub fn push_indentation(&self, indent: usize)
pub fn pop_indentation(&self)
pub fn current_indentation(&self) -> usize
pub fn check_indentation(&self, indent: usize) -> bool
Sourcepub fn enter_nested_context(&self) -> SavedContext
pub fn enter_nested_context(&self) -> SavedContext
Opens a nested context: the group body starts fresh at indentation level zero and follows the same rules as the root document.
Sourcepub fn exit_nested_context(&self, saved: SavedContext)
pub fn exit_nested_context(&self, saved: SavedContext)
Restores the context the parenthesized group was opened in.
pub fn is_inside_nested_context(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ParserState
impl !RefUnwindSafe for ParserState
impl !Sync for ParserState
impl Send for ParserState
impl Unpin for ParserState
impl UnsafeUnpin for ParserState
impl UnwindSafe for ParserState
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