pub struct RecoveryContext {
pub state: ParserState,
pub indent_level: usize,
pub in_flow: bool,
pub bracket_depth: usize,
}Expand description
Recovery context providing state information
Fields§
§state: ParserStateCurrent parser state
indent_level: usizeCurrent indentation level
in_flow: boolWhether we’re in a flow context
bracket_depth: usizeNumber of open brackets/braces
Implementations§
Source§impl RecoveryContext
impl RecoveryContext
Sourcepub fn enter_block_mapping(&mut self)
pub fn enter_block_mapping(&mut self)
Update state for block mapping
Sourcepub fn enter_flow_mapping(&mut self)
pub fn enter_flow_mapping(&mut self)
Update state for flow mapping
Sourcepub fn can_recover(&self, strategy: RecoveryStrategy) -> bool
pub fn can_recover(&self, strategy: RecoveryStrategy) -> bool
Check if recovery is safe at current position
Trait Implementations§
Source§impl Debug for RecoveryContext
impl Debug for RecoveryContext
Auto Trait Implementations§
impl Freeze for RecoveryContext
impl RefUnwindSafe for RecoveryContext
impl Send for RecoveryContext
impl Sync for RecoveryContext
impl Unpin for RecoveryContext
impl UnsafeUnpin for RecoveryContext
impl UnwindSafe for RecoveryContext
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