Skip to main content

zeroclaw_runtime/rpc/
transport.rs

1//! Transport trait for RPC connections.
2
3use async_trait::async_trait;
4use tokio::sync::mpsc;
5
6#[async_trait]
7pub trait RpcTransport: Send + 'static {
8    fn writer(&self) -> mpsc::Sender<String>;
9    async fn next_frame(&mut self) -> Option<String>;
10    fn peer_label(&self) -> String;
11}