lex_hello worked for a second just now

this is just a backup however
This commit is contained in:
2025-02-02 10:20:03 +01:00
parent 2b79e96dc9
commit 1556d54226
45 changed files with 646 additions and 371 deletions

View File

@@ -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;
}