transport.rs
1mod stdio_transport;
2
3use std::pin::Pin;
4
5use anyhow::Result;
6use async_trait::async_trait;
7use futures::Stream;
8
9pub use stdio_transport::*;
10
11#[async_trait]
12pub trait Transport: Send + Sync {
13 async fn send(&self, message: String) -> Result<()>;
14 fn receive(&self) -> Pin<Box<dyn Stream<Item = String> + Send>>;
15 fn receive_err(&self) -> Pin<Box<dyn Stream<Item = String> + Send>>;
16}