pub struct HighlightedToken { /* private fields */ }Expand description
One styled token with a line-relative byte range and exact ordered scopes.
Implementations§
Source§impl HighlightedToken
impl HighlightedToken
Sourcepub fn range(&self) -> Range<usize> ⓘ
pub fn range(&self) -> Range<usize> ⓘ
Returns the line-relative UTF-8 byte range, excluding line terminators.
Sourcepub fn scopes(&self) -> Scopes<'_> ⓘ
pub fn scopes(&self) -> Scopes<'_> ⓘ
Iterates scope names from outermost to innermost without allocating.
Sourcepub fn scope_stack(&self) -> Option<ScopeStackId>
pub fn scope_stack(&self) -> Option<ScopeStackId>
Returns the scope-stack key; see Token::scope_stack for comparability.
Trait Implementations§
Source§impl Clone for HighlightedToken
impl Clone for HighlightedToken
Source§impl Debug for HighlightedToken
impl Debug for HighlightedToken
impl Eq for HighlightedToken
Source§impl PartialEq for HighlightedToken
impl PartialEq for HighlightedToken
impl StructuralPartialEq for HighlightedToken
Auto Trait Implementations§
impl Freeze for HighlightedToken
impl RefUnwindSafe for HighlightedToken
impl Send for HighlightedToken
impl Sync for HighlightedToken
impl Unpin for HighlightedToken
impl UnsafeUnpin for HighlightedToken
impl UnwindSafe for HighlightedToken
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