pub struct HighlightKey {
pub file: FileId,
pub side: DiffSide,
pub source_line: u32,
pub text_hash: u64,
pub syntax: String,
pub theme: String,
}Expand description
Cache key for one highlighted diff row.
Fields§
§file: FileIdFile containing the row.
side: DiffSideDiff side to highlight.
source_line: u32One-based source line number.
text_hash: u64Hash of the row text.
syntax: StringSyntax key or auto.
theme: StringTheme key.
Implementations§
Source§impl HighlightKey
impl HighlightKey
Sourcepub fn new(input: HighlightKeyInput<'_>) -> Self
pub fn new(input: HighlightKeyInput<'_>) -> Self
Creates a key for a row of source text.
Trait Implementations§
Source§impl Clone for HighlightKey
impl Clone for HighlightKey
Source§impl Debug for HighlightKey
impl Debug for HighlightKey
impl Eq for HighlightKey
Source§impl Hash for HighlightKey
impl Hash for HighlightKey
Source§impl Ord for HighlightKey
impl Ord for HighlightKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for HighlightKey
impl PartialEq for HighlightKey
Source§impl PartialOrd for HighlightKey
impl PartialOrd for HighlightKey
impl StructuralPartialEq for HighlightKey
Auto Trait Implementations§
impl Freeze for HighlightKey
impl RefUnwindSafe for HighlightKey
impl Send for HighlightKey
impl Sync for HighlightKey
impl Unpin for HighlightKey
impl UnsafeUnpin for HighlightKey
impl UnwindSafe for HighlightKey
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