use core::fmt; use never::Never; use super::coding::Coding; use crate::helpers::enc_vec; pub trait Request: fmt::Debug + Sized + 'static { type Response: fmt::Debug + Coding + 'static; } pub fn respond(_: &R, rep: R::Response) -> Vec { enc_vec(&rep) } pub trait Channel: 'static { type Req: Coding + Sized + 'static; type Notif: Coding + Sized + 'static; } impl Channel for Never { type Notif = Never; type Req = Never; } pub trait MsgSet: Sync + 'static { type In: Channel; type Out: Channel; } impl MsgSet for Never { type In = Never; type Out = Never; }