pub struct RecoveryContext {
pub current_token: Option<Token>,
pub previous_token: Option<Token>,
pub recovery_tokens: Vec<String>,
pub context: ParsingContext,
}Fields§
§current_token: Option<Token>§previous_token: Option<Token>§recovery_tokens: Vec<String>§context: ParsingContextImplementations§
Source§impl RecoveryContext
impl RecoveryContext
pub fn new( current_token: Option<Token>, previous_token: Option<Token>, context: ParsingContext, ) -> Self
pub fn with_recovery_tokens(self, tokens: Vec<String>) -> Self
pub fn determine_strategy(&self) -> RecoveryStrategy
pub fn is_recovery_token(&self, token: &Token) -> bool
pub fn current_position(&self) -> Option<Position>
Trait Implementations§
Source§impl Clone for RecoveryContext
impl Clone for RecoveryContext
Source§fn clone(&self) -> RecoveryContext
fn clone(&self) -> RecoveryContext
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for RecoveryContext
impl RefUnwindSafe for RecoveryContext
impl Send for RecoveryContext
impl Sync for RecoveryContext
impl Unpin 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