pub struct OwnedLineTokens {
pub line_index: usize,
pub byte_range: Range<usize>,
pub scopes: Vec<ScopeSpan>,
}Expand description
Owned tokenization result for APIs that collect highlighted lines.
Unlike LineTokens, this type owns its scope spans so callers can keep
the result after range traversal has moved on to another line.
Fields§
§line_index: usizeZero-based line index in the blob.
byte_range: Range<usize>Byte range of this line in the blob, excluding line terminators.
scopes: Vec<ScopeSpan>Scope spans for this line.
Trait Implementations§
Source§impl Clone for OwnedLineTokens
impl Clone for OwnedLineTokens
Source§fn clone(&self) -> OwnedLineTokens
fn clone(&self) -> OwnedLineTokens
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 Debug for OwnedLineTokens
impl Debug for OwnedLineTokens
Source§impl PartialEq for OwnedLineTokens
impl PartialEq for OwnedLineTokens
Source§fn eq(&self, other: &OwnedLineTokens) -> bool
fn eq(&self, other: &OwnedLineTokens) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for OwnedLineTokens
impl StructuralPartialEq for OwnedLineTokens
Auto Trait Implementations§
impl Freeze for OwnedLineTokens
impl RefUnwindSafe for OwnedLineTokens
impl Send for OwnedLineTokens
impl Sync for OwnedLineTokens
impl Unpin for OwnedLineTokens
impl UnsafeUnpin for OwnedLineTokens
impl UnwindSafe for OwnedLineTokens
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