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§
Sourcefn path_substring(&self) -> Option<&str>
fn path_substring(&self) -> Option<&str>
Optional buffer path substring required for filtering.
If present, filtering only applies to buffers containing this substring.
Provided Methods§
Sourcefn get_diag_msg_or_skip(
&self,
buf_path: &str,
lsp_diag: &Dictionary,
) -> Result<GetDiagMsgOutput>
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.