Skip to main content

LspProgressCallback

Trait LspProgressCallback 

Source
pub trait LspProgressCallback: Send + Sync {
    // Required methods
    fn on_progress(&self, progress: f32, message: &str);
    fn on_complete(&self);
    fn on_error(&self, error: &str);
}
Expand description

Progress callback trait for UI updates

Implement this trait to receive progress updates during LSP initialization. The callback is called from async context, so implementations must be Send + Sync.

Required Methods§

Source

fn on_progress(&self, progress: f32, message: &str)

Called when progress updates

  • progress: Percentage (0.0 - 1.0)
  • message: Human-readable status message
Source

fn on_complete(&self)

Called when initialization completes successfully

Source

fn on_error(&self, error: &str)

Called when initialization fails

  • error: Error message

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§