pub struct LspInlayHintCache {
pub document_version: u64,
pub hints: Vec<InlayHint>,
pub requested_first_line: u32,
pub requested_last_line: u32,
}Expand description
4.4.g: cached textDocument/inlayHint response for one
buffer. Keyed on (BufferId, document_version); pump
invalidates when the version changes. hints are sorted
by position so the renderer can stop scanning once it
walks past the current line.
4.4.g viewport polish: requested_first_line /
requested_last_line (inclusive, 0-based LSP line indices)
record the line range that produced this cache entry. The
pump refetches when the visible viewport scrolls outside
this window plus an overscan margin – so small scrolls
stay cached, larger ones trigger a new request bounded to
the new viewport. Small files where viewport + overscan
covers the whole buffer cache exactly once and never
refetch on scroll.
Fields§
§document_version: u64§hints: Vec<InlayHint>§requested_first_line: u32§requested_last_line: u32Trait Implementations§
Source§impl Clone for LspInlayHintCache
impl Clone for LspInlayHintCache
Source§fn clone(&self) -> LspInlayHintCache
fn clone(&self) -> LspInlayHintCache
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for LspInlayHintCache
impl Freeze for LspInlayHintCache
impl Send for LspInlayHintCache
impl Sync for LspInlayHintCache
impl Unpin for LspInlayHintCache
impl UnsafeUnpin for LspInlayHintCache
impl UnwindSafe for LspInlayHintCache
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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