pub struct ProcessManager { /* private fields */ }Expand description
Manages LSP server process lifecycle
Implementations§
Source§impl ProcessManager
impl ProcessManager
Sourcepub fn new(config: LspServerConfig) -> Self
pub fn new(config: LspServerConfig) -> Self
Create a new process manager
Sourcepub fn state(&self) -> ClientState
pub fn state(&self) -> ClientState
Get the current state
Sourcepub fn restart_count(&self) -> u32
pub fn restart_count(&self) -> u32
Get the restart count
Sourcepub fn is_running(&mut self) -> bool
pub fn is_running(&mut self) -> bool
Check if process is still running
Sourcepub fn mark_unhealthy(&mut self)
pub fn mark_unhealthy(&mut self)
Mark the process as unhealthy
Sourcepub fn can_restart(&self) -> bool
pub fn can_restart(&self) -> bool
Check if restart is allowed
Sourcepub fn prepare_restart(&mut self) -> Result<Duration>
pub fn prepare_restart(&mut self) -> Result<Duration>
Prepare for restart with exponential backoff
Sourcepub fn stdin(&mut self) -> Option<ChildStdin>
pub fn stdin(&mut self) -> Option<ChildStdin>
Get the process stdin if available
Sourcepub fn stdout(&mut self) -> Option<ChildStdout>
pub fn stdout(&mut self) -> Option<ChildStdout>
Get the process stdout if available
Sourcepub fn stderr(&mut self) -> Option<ChildStderr>
pub fn stderr(&mut self) -> Option<ChildStderr>
Get the process stderr if available
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProcessManager
impl !RefUnwindSafe for ProcessManager
impl Send for ProcessManager
impl Sync for ProcessManager
impl Unpin for ProcessManager
impl !UnwindSafe for ProcessManager
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