Struct mz_lsp_server::backend::Backend

source ·
pub struct Backend {
    pub client: Client,
    pub parse_results: Mutex<HashMap<Url, ParseResult>>,
    pub content: Mutex<HashMap<Url, Rope>>,
    pub formatting_width: Mutex<usize>,
    pub schema: Mutex<Option<Schema>>,
    pub completions: Mutex<Completions>,
}
Expand description

The Backend struct implements the LanguageServer trait, and thus must provide implementations for its methods. Most imporant methods includes:

  • initialize: sets up the server.
  • did_open: logs when a file is opened and triggers an on_change method.
  • did_save, did_close: log messages indicating file actions.
  • completion: Provides completion suggestions. WIP.
  • code_lens: Offers in-editor commands. WIP.

Most of the did_ methods re-route the request to the private method on_change within the Backend struct. This method is triggered whenever there’s a change in the file, and it parses the content using mz_sql_parser. Depending on the parse result, it either sneds the logs the results or any encountered errors.

Fields§

§client: Client

Handles the communication to the client. Logs and results must be sent through the client at the end of each capability.

§parse_results: Mutex<HashMap<Url, ParseResult>>

Contains parsing results for each open file. Instead of retrieving the last version from the file each time a command, like formatting, is executed, we use the most recent parsing results stored here. Reading from the file would access old content. E.g. The user formats or performs an action prior to save the file.

§content: Mutex<HashMap<Url, Rope>>

Contains the latest content for each file.

§formatting_width: Mutex<usize>

Formatting width to use in mz- prettier

§schema: Mutex<Option<Schema>>

Schema available in the client used for completion suggestions.

§completions: Mutex<Completions>

Completion suggestion to return to the client when requested.

Implementations§

source§

impl Backend

source

async fn parse(&self, params: TextDocumentItem)

Parses the SQL code and publishes diagnosis about it.

source

fn contains_jinja_code(&self, s: &str) -> bool

Detects if the code contains Jinja code using RegEx and looks for Jinja’s delimiters:

  • {% … %} for Statements
  • {{ … }} for Expressions to print to the template output
  • {# … #} for Comments not included in the template output

Reference: https://jinja.palletsprojects.com/en/3.0.x/templates/#synopsis

The trade-off is that the regex is simple, but it may detect some code as Jinja when it is not actually Jinja. For example: SELECT '{{ 100 }}';. To handle such cases more successfully, the server will first attempt to parse the file, and if it fails, it will then check if it contains Jinja code.

source

fn is_jinja(&self, s: &str, code: String) -> bool

Returns true if Jinja code is detected.

source

fn build_completion_items(&self, schema: Schema) -> Completions

Builds the completion items for the following statements:

  • SELECT
  • FROM

Use this function to build the completion items once, and avoid having to rebuild on every LanguageServer::completion call.

Trait Implementations§

source§

impl Debug for Backend

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl LanguageServer for Backend

source§

fn execute_command<'life0, 'async_trait>( &'life0 self, command_params: ExecuteCommandParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Executes a single command and returns the response. Def: workspace/executeCommand

Commands implemented:

  • parse: returns multiple valid statements from a single sql code.
source§

fn completion<'life0, 'async_trait>( &'life0 self, params: CompletionParams, ) -> Pin<Box<dyn Future<Output = Result<Option<CompletionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Completion implementation.

source§

fn formatting<'life0, 'async_trait>( &'life0 self, params: DocumentFormattingParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Formats the code using mz_sql_pretty.

Implements the textDocument/formatting language feature.

source§

fn initialize<'life0, 'async_trait>( &'life0 self, params: InitializeParams, ) -> Pin<Box<dyn Future<Output = Result<InitializeResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The initialize request is the first request sent from the client to the server. Read more
source§

fn initialized<'life0, 'async_trait>( &'life0 self, __arg1: InitializedParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 more
source§

fn shutdown<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The shutdown request asks the server to gracefully shut down, but to not exit. Read more
source§

fn did_change_workspace_folders<'life0, 'async_trait>( &'life0 self, __arg1: DidChangeWorkspaceFoldersParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The workspace/didChangeWorkspaceFolders notification is sent from the client to the server to inform about workspace folder configuration changes. Read more
source§

fn did_change_configuration<'life0, 'async_trait>( &'life0 self, __arg1: DidChangeConfigurationParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The workspace/didChangeConfiguration notification is sent from the client to the server to signal the change of configuration settings.
source§

fn did_change_watched_files<'life0, 'async_trait>( &'life0 self, __arg1: DidChangeWatchedFilesParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 more
source§

fn did_open<'life0, 'async_trait>( &'life0 self, params: DidOpenTextDocumentParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 more
source§

fn did_change<'life0, 'async_trait>( &'life0 self, params: DidChangeTextDocumentParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The textDocument/didChange notification is sent from the client to the server to signal changes to a text document. Read more
source§

fn did_save<'life0, 'async_trait>( &'life0 self, __arg1: DidSaveTextDocumentParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The textDocument/didSave notification is sent from the client to the server when the document was saved in the client.
source§

fn did_close<'life0, 'async_trait>( &'life0 self, __arg1: DidCloseTextDocumentParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The textDocument/didClose notification is sent from the client to the server when the document got closed in the client. Read more
source§

fn code_lens<'life0, 'async_trait>( &'life0 self, _params: CodeLensParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CodeLens>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The textDocument/codeLens request is sent from the client to the server to compute code lenses for a given text document.
source§

fn will_save<'life0, 'async_trait>( &'life0 self, params: WillSaveTextDocumentParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/willSave notification is sent from the client to the server before the document is actually saved.
source§

fn will_save_wait_until<'life0, 'async_trait>( &'life0 self, params: WillSaveTextDocumentParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/willSaveWaitUntil request is sent from the client to the server before the document is actually saved. Read more
source§

fn goto_declaration<'life0, 'async_trait>( &'life0 self, params: GotoDefinitionParams, ) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/declaration request asks the server for the declaration location of a symbol at a given text document position. Read more
source§

fn goto_definition<'life0, 'async_trait>( &'life0 self, params: GotoDefinitionParams, ) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/definition request asks the server for the definition location of a symbol at a given text document position. Read more
source§

fn goto_type_definition<'life0, 'async_trait>( &'life0 self, params: GotoDefinitionParams, ) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/typeDefinition request asks the server for the type definition location of a symbol at a given text document position. Read more
source§

fn goto_implementation<'life0, 'async_trait>( &'life0 self, params: GotoDefinitionParams, ) -> Pin<Box<dyn Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn references<'life0, 'async_trait>( &'life0 self, params: ReferenceParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Location>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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§

fn prepare_call_hierarchy<'life0, 'async_trait>( &'life0 self, params: CallHierarchyPrepareParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyItem>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn incoming_calls<'life0, 'async_trait>( &'life0 self, params: CallHierarchyIncomingCallsParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyIncomingCall>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The callHierarchy/incomingCalls request is sent from the client to the server to resolve incoming calls for a given call hierarchy item. Read more
source§

fn outgoing_calls<'life0, 'async_trait>( &'life0 self, params: CallHierarchyOutgoingCallsParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CallHierarchyOutgoingCall>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The callHierarchy/outgoingCalls request is sent from the client to the server to resolve outgoing calls for a given call hierarchy item. Read more
source§

fn prepare_type_hierarchy<'life0, 'async_trait>( &'life0 self, params: TypeHierarchyPrepareParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn supertypes<'life0, 'async_trait>( &'life0 self, params: TypeHierarchySupertypesParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The [typeHierarchy/supertypes] request is sent from the client to the server to resolve the supertypes for a given type hierarchy item. Read more
source§

fn subtypes<'life0, 'async_trait>( &'life0 self, params: TypeHierarchySubtypesParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The [typeHierarchy/subtypes] request is sent from the client to the server to resolve the subtypes for a given type hierarchy item. Read more
source§

fn document_highlight<'life0, 'async_trait>( &'life0 self, params: DocumentHighlightParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<DocumentHighlight>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/documentHighlight request is sent from the client to the server to resolve appropriate highlights for a given text document position. Read more
The textDocument/documentLink request is sent from the client to the server to request the location of links in a document. Read more
The documentLink/resolve request is sent from the client to the server to resolve the target of a given document link. Read more
source§

fn hover<'life0, 'async_trait>( &'life0 self, params: HoverParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Hover>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/hover request asks the server for hover information at a given text document position. Read more
source§

fn code_lens_resolve<'life0, 'async_trait>( &'life0 self, params: CodeLens, ) -> Pin<Box<dyn Future<Output = Result<CodeLens, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The codeLens/resolve request is sent from the client to the server to resolve the command for a given code lens item.
source§

fn folding_range<'life0, 'async_trait>( &'life0 self, params: FoldingRangeParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<FoldingRange>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/foldingRange request is sent from the client to the server to return all folding ranges found in a given text document. Read more
source§

fn selection_range<'life0, 'async_trait>( &'life0 self, params: SelectionRangeParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SelectionRange>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn document_symbol<'life0, 'async_trait>( &'life0 self, params: DocumentSymbolParams, ) -> Pin<Box<dyn Future<Output = Result<Option<DocumentSymbolResponse>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/documentSymbol request is sent from the client to the server to retrieve all symbols found in a given text document. Read more
source§

fn semantic_tokens_full<'life0, 'async_trait>( &'life0 self, params: SemanticTokensParams, ) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/semanticTokens/full request is sent from the client to the server to resolve the semantic tokens of a given file. Read more
source§

fn semantic_tokens_full_delta<'life0, 'async_trait>( &'life0 self, params: SemanticTokensDeltaParams, ) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensFullDeltaResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn semantic_tokens_range<'life0, 'async_trait>( &'life0 self, params: SemanticTokensRangeParams, ) -> Pin<Box<dyn Future<Output = Result<Option<SemanticTokensRangeResult>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn inline_value<'life0, 'async_trait>( &'life0 self, params: InlineValueParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<InlineValue>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn inlay_hint<'life0, 'async_trait>( &'life0 self, params: InlayHintParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<InlayHint>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn inlay_hint_resolve<'life0, 'async_trait>( &'life0 self, params: InlayHint, ) -> Pin<Box<dyn Future<Output = Result<InlayHint, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The inlayHint/resolve request is sent from the client to the server to resolve additional information for a given inlay hint. Read more
source§

fn moniker<'life0, 'async_trait>( &'life0 self, params: MonikerParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<Moniker>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/moniker request is sent from the client to the server to get the symbol monikers for a given text document position. Read more
source§

fn completion_resolve<'life0, 'async_trait>( &'life0 self, params: CompletionItem, ) -> Pin<Box<dyn Future<Output = Result<CompletionItem, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The completionItem/resolve request is sent from the client to the server to resolve additional information for a given completion item.
source§

fn diagnostic<'life0, 'async_trait>( &'life0 self, params: DocumentDiagnosticParams, ) -> Pin<Box<dyn Future<Output = Result<DocumentDiagnosticReportResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn workspace_diagnostic<'life0, 'async_trait>( &'life0 self, params: WorkspaceDiagnosticParams, ) -> Pin<Box<dyn Future<Output = Result<WorkspaceDiagnosticReportResult, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn signature_help<'life0, 'async_trait>( &'life0 self, params: SignatureHelpParams, ) -> Pin<Box<dyn Future<Output = Result<Option<SignatureHelp>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/signatureHelp request is sent from the client to the server to request signature information at a given cursor position.
source§

fn code_action<'life0, 'async_trait>( &'life0 self, params: CodeActionParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CodeActionOrCommand>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn code_action_resolve<'life0, 'async_trait>( &'life0 self, params: CodeAction, ) -> Pin<Box<dyn Future<Output = Result<CodeAction, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The codeAction/resolve request is sent from the client to the server to resolve additional information for a given code action. Read more
source§

fn document_color<'life0, 'async_trait>( &'life0 self, params: DocumentColorParams, ) -> Pin<Box<dyn Future<Output = Result<Vec<ColorInformation>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn color_presentation<'life0, 'async_trait>( &'life0 self, params: ColorPresentationParams, ) -> Pin<Box<dyn Future<Output = Result<Vec<ColorPresentation>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn range_formatting<'life0, 'async_trait>( &'life0 self, params: DocumentRangeFormattingParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/rangeFormatting request is sent from the client to the server to format a given range in a document.
source§

fn on_type_formatting<'life0, 'async_trait>( &'life0 self, params: DocumentOnTypeFormattingParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The textDocument/onTypeFormatting request is sent from the client to the server to format parts of the document during typing.
source§

fn rename<'life0, 'async_trait>( &'life0 self, params: RenameParams, ) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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§

fn prepare_rename<'life0, 'async_trait>( &'life0 self, params: TextDocumentPositionParams, ) -> Pin<Box<dyn Future<Output = Result<Option<PrepareRenameResponse>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn linked_editing_range<'life0, 'async_trait>( &'life0 self, params: LinkedEditingRangeParams, ) -> Pin<Box<dyn Future<Output = Result<Option<LinkedEditingRanges>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn symbol<'life0, 'async_trait>( &'life0 self, params: WorkspaceSymbolParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<SymbolInformation>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The workspace/symbol request is sent from the client to the server to list project-wide symbols matching the given query string. Read more
source§

fn symbol_resolve<'life0, 'async_trait>( &'life0 self, params: WorkspaceSymbol, ) -> Pin<Box<dyn Future<Output = Result<WorkspaceSymbol, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The workspaceSymbol/resolve request is sent from the client to the server to resolve additional information for a given workspace symbol. Read more
source§

fn will_create_files<'life0, 'async_trait>( &'life0 self, params: CreateFilesParams, ) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn did_create_files<'life0, 'async_trait>( &'life0 self, params: CreateFilesParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The workspace/didCreateFiles request is sent from the client to the server when files were created from within the client.
source§

fn will_rename_files<'life0, 'async_trait>( &'life0 self, params: RenameFilesParams, ) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

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 more
source§

fn did_rename_files<'life0, 'async_trait>( &'life0 self, params: RenameFilesParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The workspace/didRenameFiles notification is sent from the client to the server when files were renamed from within the client.
source§

fn will_delete_files<'life0, 'async_trait>( &'life0 self, params: DeleteFilesParams, ) -> Pin<Box<dyn Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The workspace/willDeleteFiles request is sent from the client to the server before files are actually deleted as long as the deletion is triggered from within the client either by a user action or by applying a workspace edit. Read more
source§

fn did_delete_files<'life0, 'async_trait>( &'life0 self, params: DeleteFilesParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The workspace/didDeleteFiles notification is sent from the client to the server when files were deleted from within the client.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

fn cast_into(self) -> U

Performs the cast.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more