/// Models a Uni from `reactive-mutiny`. /// A `Uni` links a `Channel` (able to produce and consume messages) to a `Stream` and a /// `StreamExecutor`, that will consume the Stream to completion... /// but these parts are not present here as this is only a simplified model. use std::marker::PhantomData; use super::channel::GenericChannel; pub struct Uni> { pub _phantom: PhantomData<(MsgType,ChannelType)> } impl> Uni {} pub trait GenericUni { const INSTRUMENTS: usize; type ItemType; type UniChannelType: GenericChannel; type DerivedItemType; } impl> GenericUni for Uni { const INSTRUMENTS: usize = INSTRUMENTS; type ItemType = MsgType; type UniChannelType = ChannelType; type DerivedItemType = >::DerivedType; } pub type MessagingMutinyStream*/> = MutinyStream>::ItemType, >::UniChannelType, >::DerivedItemType>; pub struct MutinyStream, DerivedItem> { _phantom_data: PhantomData<(Item, UniChannelType, DerivedItem)> } impl, DerivedItem> Iterator for MutinyStream { type Item=DerivedItem; fn next(&mut self) -> Option { todo!() } }