pub trait Server<Service> {
type Result;
fn serve(&self, service: Service) -> Self::Result;
}
pub mod channel {
use async_trait::async_trait;
use std::error::Error;
#[async_trait(?Send)]
pub trait Sender<T> {
type Error: Error;
async fn send(&self, item: T) -> Result<(), Self::Error>;
fn try_send(&self, item: T) -> Result<(), Self::Error>;
}
#[async_trait(?Send)]
pub trait Receiver<T> {
async fn recv(&self) -> Option<T>;
}
}
pub mod common;
pub mod impls;