forked from Orchid/orchid
lex_hello worked for a second just now
this is just a backup however
This commit is contained in:
@@ -3,6 +3,7 @@ mod helpers;
|
||||
mod hierarchy;
|
||||
mod relations;
|
||||
|
||||
pub use async_std;
|
||||
pub use coding::*;
|
||||
pub use helpers::*;
|
||||
pub use hierarchy::*;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
use core::fmt;
|
||||
use std::future::Future;
|
||||
|
||||
use super::coding::Coding;
|
||||
use crate::helpers::enc_vec;
|
||||
|
||||
pub trait Request: Coding + Sized + Send + 'static {
|
||||
type Response: Coding + Send + 'static;
|
||||
pub trait Request: fmt::Debug + Coding + Sized + 'static {
|
||||
type Response: fmt::Debug + Coding + 'static;
|
||||
}
|
||||
|
||||
pub async fn respond<R: Request>(_: &R, rep: R::Response) -> Vec<u8> { enc_vec(&rep).await }
|
||||
@@ -16,11 +17,11 @@ pub async fn respond_with<R: Request, F: Future<Output = R::Response>>(
|
||||
}
|
||||
|
||||
pub trait Channel: 'static {
|
||||
type Req: Coding + Sized + Send + 'static;
|
||||
type Notif: Coding + Sized + Send + 'static;
|
||||
type Req: Coding + Sized + 'static;
|
||||
type Notif: Coding + Sized + 'static;
|
||||
}
|
||||
|
||||
pub trait MsgSet: Send + Sync + 'static {
|
||||
pub trait MsgSet: Sync + 'static {
|
||||
type In: Channel;
|
||||
type Out: Channel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user