techne_client/transport.rs
1use crate::mcp::Bytes;
2
3use futures::channel::mpsc;
4use futures::future::BoxFuture;
5
6use std::io;
7
8pub trait Transport {
9 fn listen(&self) -> BoxFuture<'static, io::Result<Channel>>;
10
11 fn send(&self, bytes: Bytes) -> BoxFuture<'static, io::Result<Channel>>;
12}
13
14pub type Channel = mpsc::Receiver<Bytes>;