pub struct DocumentEntry {
pub version: i32,
pub mtime: Option<SystemTime>,
pub size: Option<u64>,
}Expand description
Per-document state tracked for LSP synchronization.
We track mtime and size so we can detect when a file has been changed
outside the AFT pipeline (another tool, another session, manual edit) and
resync the LSP server before issuing diagnostic requests. Without this,
ensure_file_open would skip already-open files and return diagnostics
computed from stale in-memory content.
Fields§
§version: i32Monotonically increasing LSP version, starts at 0.
mtime: Option<SystemTime>Filesystem modification time at the moment we last synced this file
to the LSP server (didOpen or didChange). None if the file did not
exist on disk when we last synced (e.g. in-memory-only test fixtures
or files mid-rename).
size: Option<u64>Filesystem byte size at the moment we last synced. None for the
same reasons as mtime.
Trait Implementations§
Source§impl Clone for DocumentEntry
impl Clone for DocumentEntry
Source§fn clone(&self) -> DocumentEntry
fn clone(&self) -> DocumentEntry
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 Freeze for DocumentEntry
impl RefUnwindSafe for DocumentEntry
impl Send for DocumentEntry
impl Sync for DocumentEntry
impl Unpin for DocumentEntry
impl UnsafeUnpin for DocumentEntry
impl UnwindSafe for DocumentEntry
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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