Added untested comm impl
This commit is contained in:
@@ -9,12 +9,6 @@ pub trait Request: fmt::Debug + Sized + 'static {
|
||||
}
|
||||
|
||||
pub async fn respond<R: Request>(_: &R, rep: R::Response) -> Vec<u8> { enc_vec(&rep).await }
|
||||
pub async fn respond_with<R: Request, F: Future<Output = R::Response>>(
|
||||
r: &R,
|
||||
f: impl FnOnce(&R) -> F,
|
||||
) -> Vec<u8> {
|
||||
respond(r, f(r).await).await
|
||||
}
|
||||
|
||||
pub trait Channel: 'static {
|
||||
type Req: Coding + Sized + 'static;
|
||||
|
||||
Reference in New Issue
Block a user