LspFilter

Trait LspFilter 

Source
pub trait LspFilter {
    // Required methods
    fn path_substring(&self) -> Option<&str>;
    fn source(&self) -> &str;

    // Provided method
    fn get_diag_msg_or_skip(
        &self,
        buf_path: &str,
        lsp_diag: &Dictionary,
    ) -> Result<GetDiagMsgOutput> { ... }
}
Expand description

Common interface for LSP-specific diagnostic filters.

Provides utilities for path and source matching before message extraction.

Required Methods§

Source

fn path_substring(&self) -> Option<&str>

Optional buffer path substring required for filtering.

If present, filtering only applies to buffers containing this substring.

Source

fn source(&self) -> &str

LSP source name for this filter.

Provided Methods§

Source

fn get_diag_msg_or_skip( &self, buf_path: &str, lsp_diag: &Dictionary, ) -> Result<GetDiagMsgOutput>

Extract diagnostic message or decide to skip.

Checks path substring and source match, then extracts message if applicable.

§Errors
  • Missing or invalid “source” key.
  • Missing or invalid “message” key.

Implementors§