pub struct ScannerSnapshot {
pub pos: usize,
pub full_start_pos: usize,
pub token_start: usize,
pub token: SyntaxKind,
pub token_value: String,
pub token_flags: u32,
pub token_atom: Atom,
pub token_invalid_separator_pos: Option<usize>,
pub token_invalid_separator_is_consecutive: bool,
pub regex_flag_errors: Vec<RegexFlagError>,
}Expand description
A snapshot of scanner state for look-ahead.
Fields§
§pos: usize§full_start_pos: usize§token_start: usize§token: SyntaxKind§token_value: String§token_flags: u32§token_atom: Atom§token_invalid_separator_pos: Option<usize>§token_invalid_separator_is_consecutive: bool§regex_flag_errors: Vec<RegexFlagError>Trait Implementations§
Source§impl Clone for ScannerSnapshot
impl Clone for ScannerSnapshot
Source§fn clone(&self) -> ScannerSnapshot
fn clone(&self) -> ScannerSnapshot
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 moreAuto Trait Implementations§
impl Freeze for ScannerSnapshot
impl RefUnwindSafe for ScannerSnapshot
impl Send for ScannerSnapshot
impl Sync for ScannerSnapshot
impl Unpin for ScannerSnapshot
impl UnsafeUnpin for ScannerSnapshot
impl UnwindSafe for ScannerSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more