Trait Handler

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

Source

fn invalid_params(&self, id: Id) -> Message

Source

fn method_not_found(&self, id: Id) -> Message

Source

fn internal_error(&self, id: Id) -> Message

Source

fn initialized(&self) -> bool

Source

fn handle(&self, message: Message) -> Option<Message>

Source

fn apply_workspace_edit( &self, _req: ApplyWorkspaceEditParams, ) -> Result<ApplyWorkspaceEditResponse, ErrorCode>

Source

fn call_hierarchy_incoming_calls( &self, _req: CallHierarchyIncomingCallsParams, ) -> Result<Option<Vec<CallHierarchyIncomingCall>>, ErrorCode>

Source

fn call_hierarchy_outgoing_calls( &self, _req: CallHierarchyOutgoingCallsParams, ) -> Result<Option<Vec<CallHierarchyOutgoingCall>>, ErrorCode>

Source

fn call_hierarchy_prepare( &self, _req: CallHierarchyPrepareParams, ) -> Result<Option<Vec<CallHierarchyItem>>, ErrorCode>

Source

fn code_action_request( &self, _req: CodeActionParams, ) -> Result<Option<CodeActionResponse>, ErrorCode>

Source

fn code_action_resolve_request( &self, _req: CodeAction, ) -> Result<CodeAction, ErrorCode>

Source

fn code_lens_refresh(&self) -> Result<(), ErrorCode>

Source

fn code_lens_request( &self, _req: CodeLensParams, ) -> Result<Option<Vec<CodeLens>>, ErrorCode>

Source

fn code_lens_resolve(&self, _req: CodeLens) -> Result<CodeLens, ErrorCode>

Source

fn color_presentation_request( &self, _req: ColorPresentationParams, ) -> Result<Vec<ColorPresentation>, ErrorCode>

Source

fn completion( &self, _req: CompletionParams, ) -> Result<Option<CompletionResponse>, ErrorCode>

Source

fn document_color( &self, _req: DocumentColorParams, ) -> Result<Vec<ColorInformation>, ErrorCode>

Source

fn document_diagnostic_request( &self, _req: DocumentDiagnosticParams, ) -> Result<DocumentDiagnosticReportResult, ErrorCode>

Source

fn document_highlight_request( &self, _req: DocumentHighlightParams, ) -> Result<Option<Vec<DocumentHighlight>>, ErrorCode>

Source

fn document_symbol_request( &self, _req: DocumentSymbolParams, ) -> Result<Option<DocumentSymbolResponse>, ErrorCode>

Source

fn execute_command( &self, _req: ExecuteCommandParams, ) -> Result<Option<Value>, ErrorCode>

Source

fn folding_range_request( &self, _req: FoldingRangeParams, ) -> Result<Option<Vec<FoldingRange>>, ErrorCode>

Source

fn formatting( &self, _req: DocumentFormattingParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>

Source

fn goto_declaration( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>

Source

fn goto_definition( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>

Source

fn goto_implementation( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>

Source

fn goto_type_definition( &self, _req: GotoDefinitionParams, ) -> Result<GotoDefinitionResponse, ErrorCode>

Source

fn hover_request(&self, _req: HoverParams) -> Result<Option<Hover>, ErrorCode>

Source

fn initialize( &self, _req: InitializeParams, ) -> Result<InitializeResult, ErrorCode>

Source

fn inlay_hint_refresh_request(&self) -> Result<(), ErrorCode>

Source

fn inlay_hint_request( &self, _req: InlayHintParams, ) -> Result<Option<Vec<InlayHint>>, ErrorCode>

Source

fn inlay_hint_resolve_request( &self, _req: InlayHint, ) -> Result<InlayHint, ErrorCode>

Source

fn inline_value_refresh_request(&self) -> Result<(), ErrorCode>

Source

fn inline_value_request( &self, _req: InlineValueParams, ) -> Result<Option<Vec<InlineValue>>, ErrorCode>

Source

fn linked_editing_range( &self, _req: LinkedEditingRangeParams, ) -> Result<Option<LinkedEditingRanges>, ErrorCode>

Source

fn moniker_request( &self, _req: MonikerParams, ) -> Result<Option<Vec<Moniker>>, ErrorCode>

Source

fn on_type_formatting( &self, _req: DocumentOnTypeFormattingParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>

Source

fn prepare_rename_request( &self, _req: TextDocumentPositionParams, ) -> Result<Option<PrepareRenameResponse>, ErrorCode>

Source

fn range_formatting( &self, _req: DocumentRangeFormattingParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>

Source

fn references( &self, _req: ReferenceParams, ) -> Result<Option<Vec<Location>>, ErrorCode>

Source

fn register_capability(&self, _req: RegistrationParams) -> Result<(), ErrorCode>

Source

fn rename(&self, _req: RenameParams) -> Result<Option<WorkspaceEdit>, ErrorCode>

Source

fn resolve_completion_item( &self, _req: CompletionItem, ) -> Result<CompletionItem, ErrorCode>

Source

fn selection_range_request( &self, _req: SelectionRangeParams, ) -> Result<Option<Vec<SelectionRange>>, ErrorCode>

Source

fn semantic_tokens_full_delta_request( &self, _req: SemanticTokensDeltaParams, ) -> Result<Option<SemanticTokensFullDeltaResult>, ErrorCode>

Source

fn semantic_tokens_full_request( &self, _req: SemanticTokensParams, ) -> Result<Option<SemanticTokensResult>, ErrorCode>

Source

fn semantic_tokens_range_request( &self, _req: SemanticTokensRangeParams, ) -> Result<Option<SemanticTokensRangeResult>, ErrorCode>

Source

fn semantic_tokens_refresh(&self) -> Result<(), ErrorCode>

Source

fn show_document( &self, _req: ShowDocumentParams, ) -> Result<ShowDocumentResult, ErrorCode>

Source

fn show_message_request( &self, _req: ShowMessageParams, ) -> Result<Option<MessageActionItem>, ErrorCode>

Source

fn shutdown(&self) -> Result<(), ErrorCode>

Source

fn signature_help_request( &self, _req: SignatureHelpParams, ) -> Result<Option<SignatureHelp>, ErrorCode>

Source

fn type_hierarchy_prepare( &self, _req: TypeHierarchyPrepareParams, ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode>

Source

fn type_hierarchy_subtypes( &self, _req: TypeHierarchySubtypesParams, ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode>

Source

fn type_hierarchy_supertypes( &self, _req: TypeHierarchySupertypesParams, ) -> Result<Option<Vec<TypeHierarchyItem>>, ErrorCode>

Source

fn unregister_capability( &self, _req: UnregistrationParams, ) -> Result<(), ErrorCode>

Source

fn will_create_files( &self, _req: CreateFilesParams, ) -> Result<Option<WorkspaceEdit>, ErrorCode>

Source

fn will_delete_files( &self, _req: DeleteFilesParams, ) -> Result<Option<WorkspaceEdit>, ErrorCode>

Source

fn will_rename_files( &self, _req: RenameFilesParams, ) -> Result<Option<WorkspaceEdit>, ErrorCode>

Source

fn will_save_wait_until( &self, _req: WillSaveTextDocumentParams, ) -> Result<Option<Vec<TextEdit>>, ErrorCode>

Source

fn work_done_progress_create( &self, _req: WorkDoneProgressCreateParams, ) -> Result<(), ErrorCode>

Source

fn workspace_configuration( &self, _req: ConfigurationParams, ) -> Result<Vec<Value>, ErrorCode>

Source

fn workspace_diagnostic_refresh(&self) -> Result<(), ErrorCode>

Source

fn workspace_diagnostic_request( &self, _req: WorkspaceDiagnosticParams, ) -> Result<WorkspaceDiagnosticReportResult, ErrorCode>

Source

fn workspace_folders_request( &self, ) -> Result<Option<Vec<WorkspaceFolder>>, ErrorCode>

Source

fn workspace_symbol_request( &self, _req: WorkspaceSymbolParams, ) -> Result<Option<WorkspaceSymbolResponse>, ErrorCode>

Source

fn workspace_symbol_resolve( &self, _req: WorkspaceSymbol, ) -> Result<WorkspaceSymbol, ErrorCode>

Source

fn on_cancel(&self, _req: CancelParams)

Source

fn on_did_change_configuration(&self, _req: DidChangeConfigurationParams)

Source

fn on_did_change_notebook_document(&self, _req: DidChangeNotebookDocumentParams)

Source

fn on_did_change_text_document(&self, _req: DidChangeTextDocumentParams)

Source

fn on_did_change_watched_files(&self, _req: DidChangeWatchedFilesParams)

Source

fn on_did_change_workspace_folders(&self, _req: DidChangeWorkspaceFoldersParams)

Source

fn on_did_close_notebook_document(&self, _req: DidCloseNotebookDocumentParams)

Source

fn on_did_close_text_document(&self, _req: DidCloseTextDocumentParams)

Source

fn on_did_create_files(&self, _req: CreateFilesParams)

Source

fn on_did_delete_files(&self, _req: DeleteFilesParams)

Source

fn on_did_open_notebook_document(&self, _req: DidOpenNotebookDocumentParams)

Source

fn on_did_open_text_document(&self, _req: DidOpenTextDocumentParams)

Source

fn on_did_rename_files(&self, _req: RenameFilesParams)

Source

fn on_did_save_notebook_document(&self, _req: DidSaveNotebookDocumentParams)

Source

fn on_did_save_text_document(&self, _req: DidSaveTextDocumentParams)

Source

fn on_initialized(&self, _req: InitializedParams)

Source

fn on_log_message(&self, _req: LogMessageParams)

Source

fn on_log_trace(&self, _req: LogTraceParams)

Source

fn on_progress(&self, _req: ProgressParams)

Source

fn on_publish_diagnostics(&self, _req: PublishDiagnosticsParams)

Source

fn on_set_trace(&self, _req: SetTraceParams)

Source

fn on_show_message(&self, _req: ShowMessageParams)

Source

fn on_telemetry_event(&self, _req: OneOf<LSPObject, LSPArray>)

Source

fn on_will_save_text_document(&self, _req: WillSaveTextDocumentParams)

Source

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.

Implementors§