/// Models a `Uni::channel` from `reactive-mutiny`. /// A `Channel` may be a "Multiple producers & Multiple consumer" bounded queue, for instance. /// It will provide means to receive messages and to send them to `Streams`, although this part is not modeled here. use std::{marker::PhantomData, sync::Arc}; pub trait GenericChannel { const BUFFER_SIZE: usize; type ItemType; type DerivedType; } pub struct ChannelZeroCopy { pub _phantom: PhantomData } impl ChannelZeroCopy {} impl GenericChannel for ChannelZeroCopy { const BUFFER_SIZE: usize = BUFFER_SIZE; type ItemType = MsgType; type DerivedType = Arc; } pub struct ChannelMove { pub _phantom: PhantomData } impl ChannelMove {} impl GenericChannel for ChannelMove { const BUFFER_SIZE: usize = BUFFER_SIZE; type ItemType = MsgType; type DerivedType = MsgType; }