pub trait Handler:
    Sized
    + Send
    + Sync
    + 'static {
Show 94 methods
    // Provided methods
    fn invalid_params(&self, id: Id) -> Message { ... }
    fn method_not_found(&self, id: Id) -> Message { ... }
    fn internal_error(&self, id: Id) -> Message { ... }
    fn initialized(&self) -> bool { ... }
    fn handle(&self, message: Message) -> Option<Message> { ... }
    fn apply_workspace_edit(
        &self,
        _req: ApplyWorkspaceEditParams,
    ) -> Result<ApplyWorkspaceEditResponse, ErrorCode> { ... }
    fn call_hierarchy_incoming_calls(
        &self,
        _req: CallHierarchyIncomingCallsParams,
    ) -> Result<Option<Vec<CallHierarchyIncomingCall>>, ErrorCode> { ... }
    fn call_hierarchy_outgoing_calls(
        &self,
        _req: CallHierarchyOutgoingCallsParams,
    ) -> Result<Option<Vec<CallHierarchyOutgoingCall>>, ErrorCode> { ... }
    fn call_hierarchy_prepare(
        &self,
        _req: CallHierarchyPrepareParams,
    ) -> Result<Option<Vec<CallHierarchyItem>>, ErrorCode> { ... }
    fn code_action_request(
        &self,
        _req: CodeActionParams,
    ) -> Result<Option<CodeActionResponse>, ErrorCode> { ... }
    fn code_action_resolve_request(
        &self,
        _req: CodeAction,
    ) -> Result<CodeAction, ErrorCode> { ... }
    fn code_lens_refresh(&self) -> Result<(), ErrorCode> { ... }
    fn code_lens_request(
        &self,
        _req: CodeLensParams,
    ) -> Result<Option<Vec<CodeLens>>, ErrorCode> { ... }
    fn code_lens_resolve(&self, _req: CodeLens) -> Result<CodeLens, ErrorCode> { ... }
    fn color_presentation_request(
        &self,
        _req: ColorPresentationParams,
    ) -> Result<Vec<ColorPresentation>, ErrorCode> { ... }
    fn completion(
        &self,
        _req: CompletionParams,
    ) -> Result<Option<CompletionResponse>, ErrorCode> { ... }
    fn document_color(
        &self,
        _req: DocumentColorParams,
    ) -> Result<Vec<ColorInformation>, ErrorCode> { ... }
    fn document_diagnostic_request(
        &self,
        _req: DocumentDiagnosticParams,
    ) -> Result<DocumentDiagnosticReportResult, ErrorCode> { ... }
    fn document_highlight_request(
        &self,
        _req: DocumentHighlightParams,
    ) -> Result<Option<Vec<DocumentHighlight>>, ErrorCode> { ... }
    fn document_link_request(
        &self,
        _req: DocumentLinkParams,
    ) -> Result<Option<Vec<DocumentLink>>, ErrorCode> { ... }
    fn document_link_resolve(
        &self,
        _req: DocumentLink,
    ) -> Result<DocumentLink, ErrorCode> { ... }
    fn document_symbol_request(
        &self,
        _req: DocumentSymbolParams,
    ) -> Result<Option<DocumentSymbolResponse>, ErrorCode> { ... }
    fn execute_command(
        &self,
        _req: ExecuteCommandParams,
    ) -> Result<Option<Value>, ErrorCode> { ... }
    fn folding_range_request(
        &self,
        _req: FoldingRangeParams,
    ) -> Result<Option<Vec<FoldingRange>>, ErrorCode> { ... }
    fn formatting(
        &self,
        _req: DocumentFormattingParams,
    ) -> Result<Option<Vec<TextEdit>>, ErrorCode> { ... }
    fn goto_declaration(
        &self,
        _req: GotoDefinitionParams,
    ) -> Result<GotoDefinitionResponse, ErrorCode> { ... }
    fn goto_definition(
        &self,
        _req: GotoDefinitionParams,
    ) -> Result<GotoDefinitionResponse, ErrorCode> { ... }
    fn goto_implementation(
        &self,
        _req: GotoDefinitionParams,
    ) -> Result<GotoDefinitionResponse, ErrorCode> { ... }
    fn goto_type_definition(
        &self,
        _req: GotoDefinitionParams,
    ) -> Result<GotoDefinitionResponse, ErrorCode> { ... }
    fn hover_request(
        &self,
        _req: HoverParams,
    ) -> Result<Option<Hover>, ErrorCode> { ... }
    fn initialize(
        &self,
        _req: InitializeParams,
    ) -> Result<InitializeResult, ErrorCode> { ... }
    fn inlay_hint_refresh_request(&self) -> Result<(), ErrorCode> { ... }
    fn inlay_hint_request(
        &self,
        _req: InlayHintParams,
    ) -> Result<Option<Vec<InlayHint>>, ErrorCode> { ... }
    fn inlay_hint_resolve_request(
        &self,
        _req: InlayHint,
    ) -> Result<InlayHint, ErrorCode> { ... }
    fn inline_value_refresh_request(&self) -> Result<(), ErrorCode> { ... }
    fn inline_value_request(
        &self,
        _req: InlineValueParams,
    ) -> Result<Option<Vec<InlineValue>>, ErrorCode> { ... }
    fn linked_editing_range(
        &self,
        _req: LinkedEditingRangeParams,
    ) -> Result<Option<LinkedEditingRanges>, ErrorCode> { ... }
    fn moniker_request(
        &self,
        _req: MonikerParams,
    ) -> Result<Option<Vec<Moniker>>, ErrorCode> { ... }
    fn on_type_formatting(
        &self,
        _req: DocumentOnTypeFormattingParams,
    ) -> Result<Option<Vec<TextEdit>>, ErrorCode> { ... }
    fn prepare_rename_request(
        &self,
        _req: TextDocumentPositionParams,
    ) -> Result<Option<PrepareRenameResponse>, ErrorCode> { ... }
    fn range_formatting(
        &self,
        _req: DocumentRangeFormattingParams,
    ) -> Result<Option<Vec<TextEdit>>, ErrorCode> { ... }
    fn references(
        &self,
        _req: ReferenceParams,
    ) -> Result<Option<Vec<Location>>, ErrorCode> { ... }
    fn register_capability(
        &self,
        _req: RegistrationParams,
    ) -> Result<(), ErrorCode> { ... }
    fn rename(
        &self,
        _req: RenameParams,
    ) -> Result<Option<WorkspaceEdit>, ErrorCode> { ... }
    fn resolve_completion_item(
        &self,
        _req: CompletionItem,
    ) -> Result<CompletionItem, ErrorCode> { ... }
    fn selection_range_request(
        &self,
        _req: SelectionRangeParams,
    ) -> Result<Option<Vec<SelectionRange>>, ErrorCode> { ... }
    fn semantic_tokens_full_delta_request(
        &self,
        _req: SemanticTokensDeltaParams,
    ) -> Result<Option<SemanticTokensFullDeltaResult>, ErrorCode> { ... }
    fn semantic_tokens_full_request(
        &self,
        _req: SemanticTokensParams,
    ) -> Result<Option<SemanticTokensResult>, ErrorCode> { ... }
    fn semantic_tokens_range_request(
        &self,
        _req: SemanticTokensRangeParams,
    ) -> Result<Option<SemanticTokensRangeResult>, ErrorCode> { ... }
    fn semantic_tokens_refresh(&self) -> Result<(), ErrorCode> { ... }
    fn show_document(
        &self,
        _req: ShowDocumentParams,
    ) -> Result<ShowDocumentResult, ErrorCode> { ... }
    fn show_message_request(
        &self,
        _req: ShowMessageParams,
    ) -> Result<Option<MessageActionItem>, ErrorCode> { ... }
    fn shutdown(&self) -> Result<(), ErrorCode> { ... }
    fn signature_help_request(
        &self,
        _req: SignatureHelpParams,
    ) -> Result<Option<SignatureHelp>, ErrorCode> { ... }
    fn type_hierarchy_prepare(
        &self,
        _req: TypeHierarchyPrepareParams,
    ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode> { ... }
    fn type_hierarchy_subtypes(
        &self,
        _req: TypeHierarchySubtypesParams,
    ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode> { ... }
    fn type_hierarchy_supertypes(
        &self,
        _req: TypeHierarchySupertypesParams,
    ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode> { ... }
    fn unregister_capability(
        &self,
        _req: UnregistrationParams,
    ) -> Result<(), ErrorCode> { ... }
    fn will_create_files(
        &self,
        _req: CreateFilesParams,
    ) -> Result<Option<WorkspaceEdit>, ErrorCode> { ... }
    fn will_delete_files(
        &self,
        _req: DeleteFilesParams,
    ) -> Result<Option<WorkspaceEdit>, ErrorCode> { ... }
    fn will_rename_files(
        &self,
        _req: RenameFilesParams,
    ) -> Result<Option<WorkspaceEdit>, ErrorCode> { ... }
    fn will_save_wait_until(
        &self,
        _req: WillSaveTextDocumentParams,
    ) -> Result<Option<Vec<TextEdit>>, ErrorCode> { ... }
    fn work_done_progress_create(
        &self,
        _req: WorkDoneProgressCreateParams,
    ) -> Result<(), ErrorCode> { ... }
    fn workspace_configuration(
        &self,
        _req: ConfigurationParams,
    ) -> Result<Vec<Value>, ErrorCode> { ... }
    fn workspace_diagnostic_refresh(&self) -> Result<(), ErrorCode> { ... }
    fn workspace_diagnostic_request(
        &self,
        _req: WorkspaceDiagnosticParams,
    ) -> Result<WorkspaceDiagnosticReportResult, ErrorCode> { ... }
    fn workspace_folders_request(
        &self,
    ) -> Result<Option<Vec<WorkspaceFolder>>, ErrorCode> { ... }
    fn workspace_symbol_request(
        &self,
        _req: WorkspaceSymbolParams,
    ) -> Result<Option<WorkspaceSymbolResponse>, ErrorCode> { ... }
    fn workspace_symbol_resolve(
        &self,
        _req: WorkspaceSymbol,
    ) -> Result<WorkspaceSymbol, ErrorCode> { ... }
    fn on_cancel(&self, _req: CancelParams) { ... }
    fn on_did_change_configuration(&self, _req: DidChangeConfigurationParams) { ... }
    fn on_did_change_notebook_document(
        &self,
        _req: DidChangeNotebookDocumentParams,
    ) { ... }
    fn on_did_change_text_document(&self, _req: DidChangeTextDocumentParams) { ... }
    fn on_did_change_watched_files(&self, _req: DidChangeWatchedFilesParams) { ... }
    fn on_did_change_workspace_folders(
        &self,
        _req: DidChangeWorkspaceFoldersParams,
    ) { ... }
    fn on_did_close_notebook_document(
        &self,
        _req: DidCloseNotebookDocumentParams,
    ) { ... }
    fn on_did_close_text_document(&self, _req: DidCloseTextDocumentParams) { ... }
    fn on_did_create_files(&self, _req: CreateFilesParams) { ... }
    fn on_did_delete_files(&self, _req: DeleteFilesParams) { ... }
    fn on_did_open_notebook_document(&self, _req: DidOpenNotebookDocumentParams) { ... }
    fn on_did_open_text_document(&self, _req: DidOpenTextDocumentParams) { ... }
    fn on_did_rename_files(&self, _req: RenameFilesParams) { ... }
    fn on_did_save_notebook_document(&self, _req: DidSaveNotebookDocumentParams) { ... }
    fn on_did_save_text_document(&self, _req: DidSaveTextDocumentParams) { ... }
    fn on_initialized(&self, _req: InitializedParams) { ... }
    fn on_log_message(&self, _req: LogMessageParams) { ... }
    fn on_log_trace(&self, _req: LogTraceParams) { ... }
    fn on_progress(&self, _req: ProgressParams) { ... }
    fn on_publish_diagnostics(&self, _req: PublishDiagnosticsParams) { ... }
    fn on_set_trace(&self, _req: SetTraceParams) { ... }
    fn on_show_message(&self, _req: ShowMessageParams) { ... }
    fn on_telemetry_event(&self, _req: OneOf<LSPObject, LSPArray>) { ... }
    fn on_will_save_text_document(&self, _req: WillSaveTextDocumentParams) { ... }
    fn on_work_done_progress_cance(&self, _req: WorkDoneProgressCancelParams) { ... }
}Provided Methods§
fn invalid_params(&self, id: Id) -> Message
fn method_not_found(&self, id: Id) -> Message
fn internal_error(&self, id: Id) -> Message
fn initialized(&self) -> bool
fn handle(&self, message: Message) -> Option<Message>
fn apply_workspace_edit( &self, _req: ApplyWorkspaceEditParams, ) -> Result<ApplyWorkspaceEditResponse, ErrorCode>
fn call_hierarchy_incoming_calls( &self, _req: CallHierarchyIncomingCallsParams, ) -> Result<Option<Vec<CallHierarchyIncomingCall>>, ErrorCode>
fn call_hierarchy_outgoing_calls( &self, _req: CallHierarchyOutgoingCallsParams, ) -> Result<Option<Vec<CallHierarchyOutgoingCall>>, ErrorCode>
fn call_hierarchy_prepare( &self, _req: CallHierarchyPrepareParams, ) -> Result<Option<Vec<CallHierarchyItem>>, ErrorCode>
fn code_action_request( &self, _req: CodeActionParams, ) -> Result<Option<CodeActionResponse>, ErrorCode>
fn code_action_resolve_request( &self, _req: CodeAction, ) -> Result<CodeAction, ErrorCode>
fn code_lens_refresh(&self) -> Result<(), ErrorCode>
fn code_lens_request( &self, _req: CodeLensParams, ) -> Result<Option<Vec<CodeLens>>, ErrorCode>
fn code_lens_resolve(&self, _req: CodeLens) -> Result<CodeLens, ErrorCode>
fn color_presentation_request( &self, _req: ColorPresentationParams, ) -> Result<Vec<ColorPresentation>, ErrorCode>
fn completion( &self, _req: CompletionParams, ) -> Result<Option<CompletionResponse>, ErrorCode>
fn document_color( &self, _req: DocumentColorParams, ) -> Result<Vec<ColorInformation>, ErrorCode>
fn document_diagnostic_request( &self, _req: DocumentDiagnosticParams, ) -> Result<DocumentDiagnosticReportResult, ErrorCode>
fn document_highlight_request( &self, _req: DocumentHighlightParams, ) -> Result<Option<Vec<DocumentHighlight>>, ErrorCode>
fn document_link_request( &self, _req: DocumentLinkParams, ) -> Result<Option<Vec<DocumentLink>>, ErrorCode>
fn document_link_resolve( &self, _req: DocumentLink, ) -> Result<DocumentLink, ErrorCode>
fn document_symbol_request( &self, _req: DocumentSymbolParams, ) -> Result<Option<DocumentSymbolResponse>, ErrorCode>
fn execute_command( &self, _req: ExecuteCommandParams, ) -> Result<Option<Value>, ErrorCode>
fn folding_range_request( &self, _req: FoldingRangeParams, ) -> Result<Option<Vec<FoldingRange>>, ErrorCode>
fn formatting( &self, _req: DocumentFormattingParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>
fn goto_declaration( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>
fn goto_definition( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>
fn goto_implementation( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>
fn goto_type_definition( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>
fn hover_request(&self, _req: HoverParams) -> Result<Option<Hover>, ErrorCode>
fn initialize( &self, _req: InitializeParams, ) -> Result<InitializeResult, ErrorCode>
fn inlay_hint_refresh_request(&self) -> Result<(), ErrorCode>
fn inlay_hint_request( &self, _req: InlayHintParams, ) -> Result<Option<Vec<InlayHint>>, ErrorCode>
fn inlay_hint_resolve_request( &self, _req: InlayHint, ) -> Result<InlayHint, ErrorCode>
fn inline_value_refresh_request(&self) -> Result<(), ErrorCode>
fn inline_value_request( &self, _req: InlineValueParams, ) -> Result<Option<Vec<InlineValue>>, ErrorCode>
fn linked_editing_range( &self, _req: LinkedEditingRangeParams, ) -> Result<Option<LinkedEditingRanges>, ErrorCode>
fn moniker_request( &self, _req: MonikerParams, ) -> Result<Option<Vec<Moniker>>, ErrorCode>
fn on_type_formatting( &self, _req: DocumentOnTypeFormattingParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>
fn prepare_rename_request( &self, _req: TextDocumentPositionParams, ) -> Result<Option<PrepareRenameResponse>, ErrorCode>
fn range_formatting( &self, _req: DocumentRangeFormattingParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>
fn references( &self, _req: ReferenceParams, ) -> Result<Option<Vec<Location>>, ErrorCode>
fn register_capability(&self, _req: RegistrationParams) -> Result<(), ErrorCode>
fn rename(&self, _req: RenameParams) -> Result<Option<WorkspaceEdit>, ErrorCode>
fn resolve_completion_item( &self, _req: CompletionItem, ) -> Result<CompletionItem, ErrorCode>
fn selection_range_request( &self, _req: SelectionRangeParams, ) -> Result<Option<Vec<SelectionRange>>, ErrorCode>
fn semantic_tokens_full_delta_request( &self, _req: SemanticTokensDeltaParams, ) -> Result<Option<SemanticTokensFullDeltaResult>, ErrorCode>
fn semantic_tokens_full_request( &self, _req: SemanticTokensParams, ) -> Result<Option<SemanticTokensResult>, ErrorCode>
fn semantic_tokens_range_request( &self, _req: SemanticTokensRangeParams, ) -> Result<Option<SemanticTokensRangeResult>, ErrorCode>
fn semantic_tokens_refresh(&self) -> Result<(), ErrorCode>
fn show_document( &self, _req: ShowDocumentParams, ) -> Result<ShowDocumentResult, ErrorCode>
fn show_message_request( &self, _req: ShowMessageParams, ) -> Result<Option<MessageActionItem>, ErrorCode>
fn shutdown(&self) -> Result<(), ErrorCode>
fn signature_help_request( &self, _req: SignatureHelpParams, ) -> Result<Option<SignatureHelp>, ErrorCode>
fn type_hierarchy_prepare( &self, _req: TypeHierarchyPrepareParams, ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode>
fn type_hierarchy_subtypes( &self, _req: TypeHierarchySubtypesParams, ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode>
fn type_hierarchy_supertypes( &self, _req: TypeHierarchySupertypesParams, ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode>
fn unregister_capability( &self, _req: UnregistrationParams, ) -> Result<(), ErrorCode>
fn will_create_files( &self, _req: CreateFilesParams, ) -> Result<Option<WorkspaceEdit>, ErrorCode>
fn will_delete_files( &self, _req: DeleteFilesParams, ) -> Result<Option<WorkspaceEdit>, ErrorCode>
fn will_rename_files( &self, _req: RenameFilesParams, ) -> Result<Option<WorkspaceEdit>, ErrorCode>
fn will_save_wait_until( &self, _req: WillSaveTextDocumentParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>
fn work_done_progress_create( &self, _req: WorkDoneProgressCreateParams, ) -> Result<(), ErrorCode>
fn workspace_configuration( &self, _req: ConfigurationParams, ) -> Result<Vec<Value>, ErrorCode>
fn workspace_diagnostic_refresh(&self) -> Result<(), ErrorCode>
fn workspace_diagnostic_request( &self, _req: WorkspaceDiagnosticParams, ) -> Result<WorkspaceDiagnosticReportResult, ErrorCode>
fn workspace_folders_request( &self, ) -> Result<Option<Vec<WorkspaceFolder>>, ErrorCode>
fn workspace_symbol_request( &self, _req: WorkspaceSymbolParams, ) -> Result<Option<WorkspaceSymbolResponse>, ErrorCode>
fn workspace_symbol_resolve( &self, _req: WorkspaceSymbol, ) -> Result<WorkspaceSymbol, ErrorCode>
fn on_cancel(&self, _req: CancelParams)
fn on_did_change_configuration(&self, _req: DidChangeConfigurationParams)
fn on_did_change_notebook_document(&self, _req: DidChangeNotebookDocumentParams)
fn on_did_change_text_document(&self, _req: DidChangeTextDocumentParams)
fn on_did_change_watched_files(&self, _req: DidChangeWatchedFilesParams)
fn on_did_change_workspace_folders(&self, _req: DidChangeWorkspaceFoldersParams)
fn on_did_close_notebook_document(&self, _req: DidCloseNotebookDocumentParams)
fn on_did_close_text_document(&self, _req: DidCloseTextDocumentParams)
fn on_did_create_files(&self, _req: CreateFilesParams)
fn on_did_delete_files(&self, _req: DeleteFilesParams)
fn on_did_open_notebook_document(&self, _req: DidOpenNotebookDocumentParams)
fn on_did_open_text_document(&self, _req: DidOpenTextDocumentParams)
fn on_did_rename_files(&self, _req: RenameFilesParams)
fn on_did_save_notebook_document(&self, _req: DidSaveNotebookDocumentParams)
fn on_did_save_text_document(&self, _req: DidSaveTextDocumentParams)
fn on_initialized(&self, _req: InitializedParams)
fn on_log_message(&self, _req: LogMessageParams)
fn on_log_trace(&self, _req: LogTraceParams)
fn on_progress(&self, _req: ProgressParams)
fn on_publish_diagnostics(&self, _req: PublishDiagnosticsParams)
fn on_set_trace(&self, _req: SetTraceParams)
fn on_show_message(&self, _req: ShowMessageParams)
fn on_telemetry_event(&self, _req: OneOf<LSPObject, LSPArray>)
fn on_will_save_text_document(&self, _req: WillSaveTextDocumentParams)
fn on_work_done_progress_cance(&self, _req: WorkDoneProgressCancelParams)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.