pub struct LspDiagnosticsObserver { /* private fields */ }Expand description
The crate::tools::WriteObserver [capabilities.lsp] installs —
before_write is a true no-op (LSP has nothing to capture before a
mutation); after_write delegates straight to
LspManager::diagnostics_after_write.
Implementations§
Source§impl LspDiagnosticsObserver
impl LspDiagnosticsObserver
Sourcepub fn new(manager: Arc<LspManager>) -> Self
pub fn new(manager: Arc<LspManager>) -> Self
Wrap manager as a crate::tools::WriteObserver.
Trait Implementations§
Source§impl Debug for LspDiagnosticsObserver
impl Debug for LspDiagnosticsObserver
Source§impl WriteObserver for LspDiagnosticsObserver
impl WriteObserver for LspDiagnosticsObserver
Source§fn before_write<'life0, 'life1, 'async_trait>(
&'life0 self,
_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn before_write<'life0, 'life1, 'async_trait>(
&'life0 self,
_path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
path (already resolved + sandbox-checked) is about to be
created/overwritten/deleted. Implementations must be fast and must
never propagate a failure as a tool error — a capture failure should
degrade the OBSERVER (e.g. disable itself with a one-time warning),
never block or fail the user’s actual edit.Source§fn after_write<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn after_write<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
path was just written/deleted successfully. Not called when the
tool call itself failed (e.g. the write errored before completing).
Returns an optional annotation for the calling tool’s result text —
see the trait doc comment above.Auto Trait Implementations§
impl Freeze for LspDiagnosticsObserver
impl RefUnwindSafe for LspDiagnosticsObserver
impl Send for LspDiagnosticsObserver
impl Sync for LspDiagnosticsObserver
impl Unpin for LspDiagnosticsObserver
impl UnsafeUnpin for LspDiagnosticsObserver
impl UnwindSafe for LspDiagnosticsObserver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more