mod subprocess;
pub use subprocess::SubprocessTransport;
use async_trait::async_trait;
use std::pin::Pin;
use tokio_stream::Stream;
use crate::errors::Result;
#[async_trait]
pub trait Transport: Send + Sync {
async fn connect(&mut self) -> Result<()>;
async fn write(&self, data: &str) -> Result<()>;
fn message_stream(&self) -> Pin<Box<dyn Stream<Item = Result<serde_json::Value>> + Send + '_>>;
async fn close(&mut self) -> Result<()>;
async fn end_input(&self) -> Result<()>;
fn is_ready(&self) -> bool;
}