pub struct Backend { /* private fields */ }Implementations§
Source§impl Backend
impl Backend
pub fn new(client: Client) -> Self
Sourcepub async fn debug_stats(&self) -> Result<DebugStats>
pub async fn debug_stats(&self) -> Result<DebugStats>
$/php-lsp/debugStats — internal observability counters, used by the
stress tests to assert the read path doesn’t parse the whole workspace
and that reference-index lock traffic stays bounded per operation.
Trait Implementations§
Source§impl LanguageServer for Backend
impl LanguageServer for Backend
Source§async fn will_delete_files(
&self,
params: DeleteFilesParams,
) -> Result<Option<WorkspaceEdit>>
async fn will_delete_files( &self, params: DeleteFilesParams, ) -> Result<Option<WorkspaceEdit>>
Before a file is deleted, return workspace edits that remove every
use import referencing its PSR-4 class name.
Source§async fn initialize(&self, params: InitializeParams) -> Result<InitializeResult>
async fn initialize(&self, params: InitializeParams) -> Result<InitializeResult>
The
initialize request is the first request sent from the client to the server. Read moreSource§async fn initialized(&self, _params: InitializedParams)
async fn initialized(&self, _params: InitializedParams)
The
initialized notification is sent from the client to the server after the client
received the result of the initialize request but before the client sends anything else. Read moreSource§async fn did_change_configuration(&self, _params: DidChangeConfigurationParams)
async fn did_change_configuration(&self, _params: DidChangeConfigurationParams)
The
workspace/didChangeConfiguration notification is sent from the client to the server
to signal the change of configuration settings.Source§async fn did_change_workspace_folders(
&self,
params: DidChangeWorkspaceFoldersParams,
)
async fn did_change_workspace_folders( &self, params: DidChangeWorkspaceFoldersParams, )
The
workspace/didChangeWorkspaceFolders notification is sent from the client to the
server to inform about workspace folder configuration changes. Read moreSource§async fn did_open(&self, params: DidOpenTextDocumentParams)
async fn did_open(&self, params: DidOpenTextDocumentParams)
The
textDocument/didOpen notification is sent from the client to the server to signal
that a new text document has been opened by the client. Read moreSource§async fn did_change(&self, params: DidChangeTextDocumentParams)
async fn did_change(&self, params: DidChangeTextDocumentParams)
The
textDocument/didChange notification is sent from the client to the server to signal
changes to a text document. Read moreSource§async fn did_close(&self, params: DidCloseTextDocumentParams)
async fn did_close(&self, params: DidCloseTextDocumentParams)
The
textDocument/didClose notification is sent from the client to the server when the
document got closed in the client. Read moreSource§async fn will_save(&self, _params: WillSaveTextDocumentParams)
async fn will_save(&self, _params: WillSaveTextDocumentParams)
The
textDocument/willSave notification is sent from the client to the server before the
document is actually saved.Source§async fn will_save_wait_until(
&self,
params: WillSaveTextDocumentParams,
) -> Result<Option<Vec<TextEdit>>>
async fn will_save_wait_until( &self, params: WillSaveTextDocumentParams, ) -> Result<Option<Vec<TextEdit>>>
The
textDocument/willSaveWaitUntil request is sent from the client to the server before
the document is actually saved. Read moreSource§async fn did_save(&self, params: DidSaveTextDocumentParams)
async fn did_save(&self, params: DidSaveTextDocumentParams)
The
textDocument/didSave notification is sent from the client to the server when the
document was saved in the client.Source§async fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams)
async fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams)
The
workspace/didChangeWatchedFiles notification is sent from the client to the server
when the client detects changes to files watched by the language client. Read moreSource§async fn completion(
&self,
params: CompletionParams,
) -> Result<Option<CompletionResponse>>
async fn completion( &self, params: CompletionParams, ) -> Result<Option<CompletionResponse>>
The
textDocument/completion request is sent from the client to the server to compute
completion items at a given cursor position. Read moreSource§async fn completion_resolve(
&self,
item: CompletionItem,
) -> Result<CompletionItem>
async fn completion_resolve( &self, item: CompletionItem, ) -> Result<CompletionItem>
The
completionItem/resolve request is sent from the client to the server to resolve
additional information for a given completion item.Source§async fn goto_definition(
&self,
params: GotoDefinitionParams,
) -> Result<Option<GotoDefinitionResponse>>
async fn goto_definition( &self, params: GotoDefinitionParams, ) -> Result<Option<GotoDefinitionResponse>>
The
textDocument/definition request asks the server for the definition location of a
symbol at a given text document position. Read moreSource§async fn references(
&self,
params: ReferenceParams,
) -> Result<Option<Vec<Location>>>
async fn references( &self, params: ReferenceParams, ) -> Result<Option<Vec<Location>>>
The
textDocument/references request is sent from the client to the server to resolve
project-wide references for the symbol denoted by the given text document position.Source§async fn prepare_rename(
&self,
params: TextDocumentPositionParams,
) -> Result<Option<PrepareRenameResponse>>
async fn prepare_rename( &self, params: TextDocumentPositionParams, ) -> Result<Option<PrepareRenameResponse>>
The
textDocument/prepareRename request is sent from the client to the server to setup
and test the validity of a rename operation at a given location. Read moreSource§async fn rename(&self, params: RenameParams) -> Result<Option<WorkspaceEdit>>
async fn rename(&self, params: RenameParams) -> Result<Option<WorkspaceEdit>>
The
textDocument/rename request is sent from the client to the server to ask the server
to compute a workspace change so that the client can perform a workspace-wide rename of a
symbol.Source§async fn signature_help(
&self,
params: SignatureHelpParams,
) -> Result<Option<SignatureHelp>>
async fn signature_help( &self, params: SignatureHelpParams, ) -> Result<Option<SignatureHelp>>
The
textDocument/signatureHelp request is sent from the client to the server to request
signature information at a given cursor position.Source§async fn hover(&self, params: HoverParams) -> Result<Option<Hover>>
async fn hover(&self, params: HoverParams) -> Result<Option<Hover>>
The
textDocument/hover request asks the server for hover information at a given text
document position. Read moreSource§async fn document_symbol(
&self,
params: DocumentSymbolParams,
) -> Result<Option<DocumentSymbolResponse>>
async fn document_symbol( &self, params: DocumentSymbolParams, ) -> Result<Option<DocumentSymbolResponse>>
The
textDocument/documentSymbol request is sent from the client to the server to
retrieve all symbols found in a given text document. Read moreSource§async fn folding_range(
&self,
params: FoldingRangeParams,
) -> Result<Option<Vec<FoldingRange>>>
async fn folding_range( &self, params: FoldingRangeParams, ) -> Result<Option<Vec<FoldingRange>>>
The
textDocument/foldingRange request is sent from the client to the server to return
all folding ranges found in a given text document. Read moreSource§async fn inlay_hint(
&self,
params: InlayHintParams,
) -> Result<Option<Vec<InlayHint>>>
async fn inlay_hint( &self, params: InlayHintParams, ) -> Result<Option<Vec<InlayHint>>>
The
textDocument/inlayHint request is sent from the client to the server to compute
inlay hints for a given (text document, range) tuple that may be rendered in the editor
in place with other text. Read moreSource§async fn inlay_hint_resolve(&self, item: InlayHint) -> Result<InlayHint>
async fn inlay_hint_resolve(&self, item: InlayHint) -> Result<InlayHint>
The
inlayHint/resolve request is sent from the client to the server to resolve
additional information for a given inlay hint. Read moreSource§async fn symbol(
&self,
params: WorkspaceSymbolParams,
) -> Result<Option<WorkspaceSymbolResponse>>
async fn symbol( &self, params: WorkspaceSymbolParams, ) -> Result<Option<WorkspaceSymbolResponse>>
The
workspace/symbol request is sent from the client to the server to list project-wide
symbols matching the given query string. Read moreSource§async fn symbol_resolve(
&self,
params: WorkspaceSymbol,
) -> Result<WorkspaceSymbol>
async fn symbol_resolve( &self, params: WorkspaceSymbol, ) -> Result<WorkspaceSymbol>
The
workspaceSymbol/resolve request is sent from the client to the server to resolve
additional information for a given workspace symbol. Read moreSource§async fn semantic_tokens_full(
&self,
params: SemanticTokensParams,
) -> Result<Option<SemanticTokensResult>>
async fn semantic_tokens_full( &self, params: SemanticTokensParams, ) -> Result<Option<SemanticTokensResult>>
The
textDocument/semanticTokens/full request is sent from the client to the server to
resolve the semantic tokens of a given file. Read moreSource§async fn semantic_tokens_range(
&self,
params: SemanticTokensRangeParams,
) -> Result<Option<SemanticTokensRangeResult>>
async fn semantic_tokens_range( &self, params: SemanticTokensRangeParams, ) -> Result<Option<SemanticTokensRangeResult>>
The
textDocument/semanticTokens/range request is sent from the client to the server to
resolve the semantic tokens for the visible range of a given file. Read moreSource§async fn semantic_tokens_full_delta(
&self,
params: SemanticTokensDeltaParams,
) -> Result<Option<SemanticTokensFullDeltaResult>>
async fn semantic_tokens_full_delta( &self, params: SemanticTokensDeltaParams, ) -> Result<Option<SemanticTokensFullDeltaResult>>
The
textDocument/semanticTokens/full/delta request is sent from the client to the server to
resolve the semantic tokens of a given file, returning only the delta. Read moreSource§async fn selection_range(
&self,
params: SelectionRangeParams,
) -> Result<Option<Vec<SelectionRange>>>
async fn selection_range( &self, params: SelectionRangeParams, ) -> Result<Option<Vec<SelectionRange>>>
The
textDocument/selectionRange request is sent from the client to the server to return
suggested selection ranges at an array of given positions. A selection range is a range
around the cursor position which the user might be interested in selecting. Read moreSource§async fn prepare_call_hierarchy(
&self,
params: CallHierarchyPrepareParams,
) -> Result<Option<Vec<CallHierarchyItem>>>
async fn prepare_call_hierarchy( &self, params: CallHierarchyPrepareParams, ) -> Result<Option<Vec<CallHierarchyItem>>>
The
textDocument/prepareCallHierarchy request is sent from the client to the server to
return a call hierarchy for the language element of given text document positions. Read moreSource§async fn incoming_calls(
&self,
params: CallHierarchyIncomingCallsParams,
) -> Result<Option<Vec<CallHierarchyIncomingCall>>>
async fn incoming_calls( &self, params: CallHierarchyIncomingCallsParams, ) -> Result<Option<Vec<CallHierarchyIncomingCall>>>
The
callHierarchy/incomingCalls request is sent from the client to the server to
resolve incoming calls for a given call hierarchy item. Read moreSource§async fn outgoing_calls(
&self,
params: CallHierarchyOutgoingCallsParams,
) -> Result<Option<Vec<CallHierarchyOutgoingCall>>>
async fn outgoing_calls( &self, params: CallHierarchyOutgoingCallsParams, ) -> Result<Option<Vec<CallHierarchyOutgoingCall>>>
The
callHierarchy/outgoingCalls request is sent from the client to the server to
resolve outgoing calls for a given call hierarchy item. Read moreSource§async fn document_highlight(
&self,
params: DocumentHighlightParams,
) -> Result<Option<Vec<DocumentHighlight>>>
async fn document_highlight( &self, params: DocumentHighlightParams, ) -> Result<Option<Vec<DocumentHighlight>>>
The
textDocument/documentHighlight request is sent from the client to the server to
resolve appropriate highlights for a given text document position. Read moreSource§async fn linked_editing_range(
&self,
params: LinkedEditingRangeParams,
) -> Result<Option<LinkedEditingRanges>>
async fn linked_editing_range( &self, params: LinkedEditingRangeParams, ) -> Result<Option<LinkedEditingRanges>>
The
textDocument/linkedEditingRange request is sent from the client to the server to
return for a given position in a document the range of the symbol at the position and all
ranges that have the same content. Read moreSource§async fn goto_implementation(
&self,
params: GotoImplementationParams,
) -> Result<Option<GotoImplementationResponse>>
async fn goto_implementation( &self, params: GotoImplementationParams, ) -> Result<Option<GotoImplementationResponse>>
The
textDocument/implementation request is sent from the client to the server to resolve
the implementation location of a symbol at a given text document position. Read moreSource§async fn goto_declaration(
&self,
params: GotoDeclarationParams,
) -> Result<Option<GotoDeclarationResponse>>
async fn goto_declaration( &self, params: GotoDeclarationParams, ) -> Result<Option<GotoDeclarationResponse>>
The
textDocument/declaration request asks the server for the declaration location of a
symbol at a given text document position. Read moreSource§async fn goto_type_definition(
&self,
params: GotoTypeDefinitionParams,
) -> Result<Option<GotoTypeDefinitionResponse>>
async fn goto_type_definition( &self, params: GotoTypeDefinitionParams, ) -> Result<Option<GotoTypeDefinitionResponse>>
The
textDocument/typeDefinition request asks the server for the type definition location of
a symbol at a given text document position. Read moreSource§async fn prepare_type_hierarchy(
&self,
params: TypeHierarchyPrepareParams,
) -> Result<Option<Vec<TypeHierarchyItem>>>
async fn prepare_type_hierarchy( &self, params: TypeHierarchyPrepareParams, ) -> Result<Option<Vec<TypeHierarchyItem>>>
The
textDocument/prepareTypeHierarchy request is sent from the client to the server to
return a type hierarchy for the language element of given text document positions. Read moreSource§async fn supertypes(
&self,
params: TypeHierarchySupertypesParams,
) -> Result<Option<Vec<TypeHierarchyItem>>>
async fn supertypes( &self, params: TypeHierarchySupertypesParams, ) -> Result<Option<Vec<TypeHierarchyItem>>>
The [
typeHierarchy/supertypes] request is sent from the client to the server to resolve
the supertypes for a given type hierarchy item. Read moreSource§async fn subtypes(
&self,
params: TypeHierarchySubtypesParams,
) -> Result<Option<Vec<TypeHierarchyItem>>>
async fn subtypes( &self, params: TypeHierarchySubtypesParams, ) -> Result<Option<Vec<TypeHierarchyItem>>>
The [
typeHierarchy/subtypes] request is sent from the client to the server to resolve
the subtypes for a given type hierarchy item. Read moreSource§async fn code_lens(
&self,
params: CodeLensParams,
) -> Result<Option<Vec<CodeLens>>>
async fn code_lens( &self, params: CodeLensParams, ) -> Result<Option<Vec<CodeLens>>>
The
textDocument/codeLens request is sent from the client to the server to compute code
lenses for a given text document.Source§async fn code_lens_resolve(&self, params: CodeLens) -> Result<CodeLens>
async fn code_lens_resolve(&self, params: CodeLens) -> Result<CodeLens>
The
codeLens/resolve request is sent from the client to the server to resolve the
command for a given code lens item.Source§async fn document_link(
&self,
params: DocumentLinkParams,
) -> Result<Option<Vec<DocumentLink>>>
async fn document_link( &self, params: DocumentLinkParams, ) -> Result<Option<Vec<DocumentLink>>>
The
textDocument/documentLink request is sent from the client to the server to request
the location of links in a document. Read moreSource§async fn document_link_resolve(
&self,
params: DocumentLink,
) -> Result<DocumentLink>
async fn document_link_resolve( &self, params: DocumentLink, ) -> Result<DocumentLink>
The
documentLink/resolve request is sent from the client to the server to resolve the
target of a given document link. Read moreSource§async fn formatting(
&self,
params: DocumentFormattingParams,
) -> Result<Option<Vec<TextEdit>>>
async fn formatting( &self, params: DocumentFormattingParams, ) -> Result<Option<Vec<TextEdit>>>
The
textDocument/formatting request is sent from the client to the server to format a
whole document.Source§async fn range_formatting(
&self,
params: DocumentRangeFormattingParams,
) -> Result<Option<Vec<TextEdit>>>
async fn range_formatting( &self, params: DocumentRangeFormattingParams, ) -> Result<Option<Vec<TextEdit>>>
The
textDocument/rangeFormatting request is sent from pub(crate) the client to the server to
format a given range in a document.Source§async fn on_type_formatting(
&self,
params: DocumentOnTypeFormattingParams,
) -> Result<Option<Vec<TextEdit>>>
async fn on_type_formatting( &self, params: DocumentOnTypeFormattingParams, ) -> Result<Option<Vec<TextEdit>>>
The
textDocument/onTypeFormatting request is sent from the client to the server to
format parts of the document during typing.Source§async fn execute_command(
&self,
params: ExecuteCommandParams,
) -> Result<Option<Value>>
async fn execute_command( &self, params: ExecuteCommandParams, ) -> Result<Option<Value>>
The
workspace/executeCommand request is sent from the client to the server to trigger
command execution on the server. Read moreSource§async fn will_rename_files(
&self,
params: RenameFilesParams,
) -> Result<Option<WorkspaceEdit>>
async fn will_rename_files( &self, params: RenameFilesParams, ) -> Result<Option<WorkspaceEdit>>
The
workspace/willRenameFiles request is sent from the client to the server before
files are actually renamed as long as the rename is triggered from within the client. Read moreSource§async fn did_rename_files(&self, params: RenameFilesParams)
async fn did_rename_files(&self, params: RenameFilesParams)
The
workspace/didRenameFiles notification is sent from the client to the server when
files were renamed from within the client.Source§async fn will_create_files(
&self,
params: CreateFilesParams,
) -> Result<Option<WorkspaceEdit>>
async fn will_create_files( &self, params: CreateFilesParams, ) -> Result<Option<WorkspaceEdit>>
The
workspace/willCreateFiles request is sent from the client to the server before
files are actually created as long as the creation is triggered from within the client. Read moreSource§async fn did_create_files(&self, params: CreateFilesParams)
async fn did_create_files(&self, params: CreateFilesParams)
The
workspace/didCreateFiles request is sent from the client to the server when files
were created from within the client.Source§async fn did_delete_files(&self, params: DeleteFilesParams)
async fn did_delete_files(&self, params: DeleteFilesParams)
The
workspace/didDeleteFiles notification is sent from the client to the server when
files were deleted from within the client.Source§async fn moniker(&self, params: MonikerParams) -> Result<Option<Vec<Moniker>>>
async fn moniker(&self, params: MonikerParams) -> Result<Option<Vec<Moniker>>>
The
textDocument/moniker request is sent from the client to the server to get the
symbol monikers for a given text document position. Read moreSource§async fn inline_value(
&self,
params: InlineValueParams,
) -> Result<Option<Vec<InlineValue>>>
async fn inline_value( &self, params: InlineValueParams, ) -> Result<Option<Vec<InlineValue>>>
The
textDocument/inlineValue request is sent from the client to the server to compute
inline values for a given text document that may be rendered in the editor at the end of
lines. Read moreSource§async fn diagnostic(
&self,
params: DocumentDiagnosticParams,
) -> Result<DocumentDiagnosticReportResult>
async fn diagnostic( &self, params: DocumentDiagnosticParams, ) -> Result<DocumentDiagnosticReportResult>
The
textDocument/diagnostic request is sent from the client to the server to ask the
server to compute the diagnostics for a given document. Read moreSource§async fn workspace_diagnostic(
&self,
params: WorkspaceDiagnosticParams,
) -> Result<WorkspaceDiagnosticReportResult>
async fn workspace_diagnostic( &self, params: WorkspaceDiagnosticParams, ) -> Result<WorkspaceDiagnosticReportResult>
The
workspace/diagnostic request is sent from the client to the server to ask the
server to compute workspace wide diagnostics which previously where pushed from the server
to the client. Read moreSource§async fn code_action(
&self,
params: CodeActionParams,
) -> Result<Option<CodeActionResponse>>
async fn code_action( &self, params: CodeActionParams, ) -> Result<Option<CodeActionResponse>>
The
textDocument/codeAction request is sent from the client to the server to compute
commands for a given text document and range. These commands are typically code fixes to
either fix problems or to beautify/refactor code. Read moreSource§async fn code_action_resolve(&self, item: CodeAction) -> Result<CodeAction>
async fn code_action_resolve(&self, item: CodeAction) -> Result<CodeAction>
The
codeAction/resolve request is sent from the client to the server to resolve
additional information for a given code action. Read moreSource§fn notebook_did_open(
&self,
params: DidOpenNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_open( &self, params: DidOpenNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
The
notebookDocument/didOpen notification is sent from the client to the server when a new notebook document is opened.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn notebook_did_change(
&self,
params: DidChangeNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_change( &self, params: DidChangeNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
The
notebookDocument/didChange notification is sent from the client to the server when a notebook document changes.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn notebook_did_save(
&self,
params: DidSaveNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_save( &self, params: DidSaveNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
The
notebookDocument/didSave notification is sent from the client to the server when a notebook document is saved.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn notebook_did_close(
&self,
params: DidCloseNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_close( &self, params: DidCloseNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
The
notebookDocument/didClose notification is sent from the client to the server when a notebook document is closed.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn document_color(
&self,
params: DocumentColorParams,
) -> impl Future<Output = Result<Vec<ColorInformation>, Error>> + Send
fn document_color( &self, params: DocumentColorParams, ) -> impl Future<Output = Result<Vec<ColorInformation>, Error>> + Send
The
textDocument/documentColor request is sent from the client to the server to list
all color references found in a given text document. Along with the range, a color value in
RGB is returned. Read moreSource§fn color_presentation(
&self,
params: ColorPresentationParams,
) -> impl Future<Output = Result<Vec<ColorPresentation>, Error>> + Send
fn color_presentation( &self, params: ColorPresentationParams, ) -> impl Future<Output = Result<Vec<ColorPresentation>, Error>> + Send
The
textDocument/colorPresentation request is sent from the client to the server to
obtain a list of presentations for a color value at a given location. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Backend
impl !UnwindSafe for Backend
impl Freeze for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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