1 2 3 4 5 6 7 8 9
pub trait RpcServer { fn start(&mut self) -> Result<(), Box<dyn std::error::Error>>; fn stop(&mut self); } pub trait RpcClient { async fn connect(&mut self) -> Result<(), Box<dyn std::error::Error>>; fn disconnect(&mut self); }