pub struct CLIProcess { /* private fields */ }Expand description
Handle to a spawned CLI process
Implementations§
Source§impl CLIProcess
impl CLIProcess
Sourcepub async fn initialize(
&mut self,
cancel_token: &CancellationToken,
) -> Result<InitializeResponse>
pub async fn initialize( &mut self, cancel_token: &CancellationToken, ) -> Result<InitializeResponse>
Send initialize request and wait for response
Sourcepub async fn send_query(&mut self, request: &CLIRequest) -> Result<()>
pub async fn send_query(&mut self, request: &CLIRequest) -> Result<()>
Send a query request to the CLI
Sourcepub async fn read_message(&mut self) -> Result<Option<ProtocolMessage>>
pub async fn read_message(&mut self) -> Result<Option<ProtocolMessage>>
Read next message from stdout
Sourcepub fn is_running(&mut self) -> bool
pub fn is_running(&mut self) -> bool
Check if process is still running
Sourcepub fn try_receive_stderr(&mut self) -> Option<String>
pub fn try_receive_stderr(&mut self) -> Option<String>
Poll stderr for any messages
Auto Trait Implementations§
impl Freeze for CLIProcess
impl !RefUnwindSafe for CLIProcess
impl Send for CLIProcess
impl Sync for CLIProcess
impl Unpin for CLIProcess
impl UnsafeUnpin for CLIProcess
impl !UnwindSafe for CLIProcess
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