Struct KclLspBackend

Source
pub struct KclLspBackend {
Show 16 fields pub client: Client, pub fs: Arc<FileManager>, pub workspace_folders: DashMap<String, WorkspaceFolder>, pub stdlib_completions: HashMap<String, CompletionItem>, pub stdlib_signatures: HashMap<String, SignatureHelp>, pub stdlib_args: HashMap<String, HashMap<String, String>>, pub ast_map: DashMap<String, Program>, pub code_map: DashMap<String, Vec<u8>>, pub diagnostics_map: DashMap<String, Vec<Diagnostic>>, pub symbols_map: DashMap<String, Vec<DocumentSymbol>>, pub semantic_tokens_map: DashMap<String, Vec<SemanticToken>>, pub zoo_client: Client, pub can_send_telemetry: bool, pub executor_ctx: Arc<RwLock<Option<ExecutorContext>>>, pub can_execute: Arc<RwLock<bool>>, pub is_initialized: Arc<RwLock<bool>>, /* private fields */
}
Expand description

The lsp server backend.

Fields§

§client: Client

The client for the backend.

§fs: Arc<FileManager>

The file system client to use.

§workspace_folders: DashMap<String, WorkspaceFolder>

The workspace folders.

§stdlib_completions: HashMap<String, CompletionItem>

The stdlib completions for the language.

§stdlib_signatures: HashMap<String, SignatureHelp>

The stdlib signatures for the language.

§stdlib_args: HashMap<String, HashMap<String, String>>

For all KwArg functions in std, a map from their arg names to arg help snippets (markdown format).

§ast_map: DashMap<String, Program>

AST maps.

§code_map: DashMap<String, Vec<u8>>

Current code.

§diagnostics_map: DashMap<String, Vec<Diagnostic>>

Diagnostics.

§symbols_map: DashMap<String, Vec<DocumentSymbol>>

Symbols map.

§semantic_tokens_map: DashMap<String, Vec<SemanticToken>>

Semantic tokens map.

§zoo_client: Client

The Zoo API client.

§can_send_telemetry: bool

If we can send telemetry for this user.

§executor_ctx: Arc<RwLock<Option<ExecutorContext>>>

Optional executor context to use if we want to execute the code.

§can_execute: Arc<RwLock<bool>>

If we are currently allowed to execute the ast.

§is_initialized: Arc<RwLock<bool>>

Implementations§

Source§

impl Backend

Source

pub fn new( client: Client, executor_ctx: Option<ExecutorContext>, zoo_client: Client, can_send_telemetry: bool, ) -> Result<Self, String>

Source§

impl Backend

Source

pub async fn can_execute(&self) -> bool

Source

pub async fn executor_ctx(&self) -> RwLockReadGuard<'_, Option<ExecutorContext>>

Source

pub fn get_semantic_token_type_index( &self, token_type: &SemanticTokenType, ) -> Option<u32>

Source

pub fn get_semantic_token_modifier_index( &self, token_types: Vec<SemanticTokenModifier>, ) -> Option<u32>

Source

pub async fn create_zip(&self) -> Result<Vec<u8>>

Source

pub async fn send_telemetry(&self) -> Result<()>

Source

pub async fn update_can_execute( &self, params: UpdateCanExecuteParams, ) -> RpcResult<UpdateCanExecuteResponse>

Source

pub fn inner_prepare_rename( &self, params: &TextDocumentPositionParams, new_name: &str, ) -> RpcResult<Option<(String, String)>>

Returns the new string for the code after rename.

Trait Implementations§

Source§

impl Clone for Backend

Source§

fn clone(&self) -> Backend

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl LanguageServer for Backend

Source§

fn initialize<'life0, 'async_trait>( &'life0 self, params: InitializeParams, ) -> Pin<Box<dyn Future<Output = RpcResult<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, params: 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 = RpcResult<()>> + 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, params: 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, params: 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, params: 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_create_files<'life0, 'async_trait>( &'life0 self, params: CreateFilesParams, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

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

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

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

The workspace/didDeleteFiles notification is sent from the client to the server when files were deleted from within the client.
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, params: 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, params: 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 hover<'life0, 'async_trait>( &'life0 self, params: HoverParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<LspHover>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

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

The textDocument/completion request is sent from the client to the server to compute completion items at a given cursor position. Read more
Source§

fn diagnostic<'life0, 'async_trait>( &'life0 self, params: DocumentDiagnosticParams, ) -> Pin<Box<dyn Future<Output = RpcResult<DocumentDiagnosticReportResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 signature_help<'life0, 'async_trait>( &'life0 self, params: SignatureHelpParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<SignatureHelp>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 inlay_hint<'life0, 'async_trait>( &'life0 self, _params: InlayHintParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<InlayHint>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 semantic_tokens_full<'life0, 'async_trait>( &'life0 self, params: SemanticTokensParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<SemanticTokensResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 document_symbol<'life0, 'async_trait>( &'life0 self, params: DocumentSymbolParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<DocumentSymbolResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 formatting<'life0, 'async_trait>( &'life0 self, params: DocumentFormattingParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<TextEdit>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

The textDocument/formatting request is sent from the client to the server to format a whole document.
Source§

fn rename<'life0, 'async_trait>( &'life0 self, params: RenameParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<WorkspaceEdit>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = RpcResult<Option<PrepareRenameResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 folding_range<'life0, 'async_trait>( &'life0 self, params: FoldingRangeParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<Vec<FoldingRange>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 code_action<'life0, 'async_trait>( &'life0 self, params: CodeActionParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Option<CodeActionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 document_color<'life0, 'async_trait>( &'life0 self, params: DocumentColorParams, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<ColorInformation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = RpcResult<Vec<ColorPresentation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 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 code_lens<'life0, 'async_trait>( &'life0 self, params: CodeLensParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<CodeLens>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: '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 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 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 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_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 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 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 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 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 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 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 execute_command<'life0, 'async_trait>( &'life0 self, params: ExecuteCommandParams, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The workspace/executeCommand request is sent from the client to the server to trigger command execution on the server. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoResult<T> for T

Source§

impl<T> IntoResult<T> for T

Source§

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

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

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

Source§

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>,

Source§

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
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T