#[non_exhaustive]pub struct Highlighted<'a> {
pub tokens: Vec<HighlightToken<'a>>,
pub errors: Vec<LexError>,
}Expand description
The result of highlight: a lossless token stream plus any lexer errors. #[non_exhaustive]
so fields can be added without breaking downstream matches.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tokens: Vec<HighlightToken<'a>>Every token in source order; concatenating their text reproduces the input byte-for-byte.
errors: Vec<LexError>Lexer errors recovered while tokenizing (empty for clean input).
Trait Implementations§
Source§impl<'a> Clone for Highlighted<'a>
impl<'a> Clone for Highlighted<'a>
Source§fn clone(&self) -> Highlighted<'a>
fn clone(&self) -> Highlighted<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for Highlighted<'a>
impl<'a> Debug for Highlighted<'a>
impl<'a> Eq for Highlighted<'a>
Source§impl<'a> PartialEq for Highlighted<'a>
impl<'a> PartialEq for Highlighted<'a>
impl<'a> StructuralPartialEq for Highlighted<'a>
Auto Trait Implementations§
impl<'a> Freeze for Highlighted<'a>
impl<'a> RefUnwindSafe for Highlighted<'a>
impl<'a> Send for Highlighted<'a>
impl<'a> Sync for Highlighted<'a>
impl<'a> Unpin for Highlighted<'a>
impl<'a> UnsafeUnpin for Highlighted<'a>
impl<'a> UnwindSafe for Highlighted<'a>
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