1use async_trait::async_trait;
2use crate::protocol::*;
3
4#[async_trait]
8pub trait IceObject {
9 async fn ice_ping(&mut self) -> Result<(), Box<dyn std::error::Error + Sync + Send>>;
10 async fn ice_is_a(&mut self) -> Result<bool, Box<dyn std::error::Error + Sync + Send>>;
11 async fn ice_id(&mut self) -> Result<String, Box<dyn std::error::Error + Sync + Send>>;
12 async fn ice_ids(&mut self) -> Result<Vec<String>, Box<dyn std::error::Error + Sync + Send>>;
13}
14
15#[async_trait]
16pub trait IceObjectServer {
17 async fn handle_request(&mut self, request: &RequestData) -> Result<ReplyData, Box<dyn std::error::Error + Sync + Send>>;
18}