Skip to main content

LspQueryReadView

Trait LspQueryReadView 

Source
pub trait LspQueryReadView {
    // Provided methods
    fn document(&self, uri: &str) -> Option<&LspTextDocumentState> { ... }
    fn document_for_file_id(
        &self,
        file_id: LspFileId,
    ) -> Option<&LspTextDocumentState> { ... }
    fn workspace_folder(&self, uri: &str) -> Option<&LspWorkspaceFolderState> { ... }
    fn cascade_narrowing_substrate_memo_lock(
        &self,
    ) -> MutexGuard<'_, Option<LspCascadeNarrowingSubstrateMemo>> { ... }
    fn workspace_occurrence_index_memo_lock(
        &self,
    ) -> MutexGuard<'_, Option<LspWorkspaceOccurrenceIndexMemo>> { ... }
    fn resolver_identity_index_memo_lock(
        &self,
    ) -> MutexGuard<'_, Option<LspResolverIdentityIndexMemo>> { ... }
    fn style_workspace_snapshot_revision_hint(&self) -> IncrementalRevisionV0 { ... }
}
Expand description

Read-only state surface available to off-loop query work.

The required methods mirror the fields copied by LspShellState::query_snapshot. Loop-owned state is intentionally absent, so a resolver cannot accidentally observe a default-filled cache, process pool, scheduler, or cancellation registry.

let _ = view.shutdown_requested();

Provided Methods§

Source

fn document(&self, uri: &str) -> Option<&LspTextDocumentState>

Source

fn document_for_file_id( &self, file_id: LspFileId, ) -> Option<&LspTextDocumentState>

Source

fn workspace_folder(&self, uri: &str) -> Option<&LspWorkspaceFolderState>

Source

fn cascade_narrowing_substrate_memo_lock( &self, ) -> MutexGuard<'_, Option<LspCascadeNarrowingSubstrateMemo>>

Source

fn workspace_occurrence_index_memo_lock( &self, ) -> MutexGuard<'_, Option<LspWorkspaceOccurrenceIndexMemo>>

Source

fn resolver_identity_index_memo_lock( &self, ) -> MutexGuard<'_, Option<LspResolverIdentityIndexMemo>>

Source

fn style_workspace_snapshot_revision_hint(&self) -> IncrementalRevisionV0

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§