pub trait ChannelUni<'a, ItemType, DerivedItemType>where
    ItemType: Debug + Send + Sync,
    DerivedItemType: Debug,{
    // Required method
    fn create_stream(
        self: &Arc<Self>
    ) -> (MutinyStream<'a, ItemType, Self, DerivedItemType>, u32)
       where Self: ChannelConsumer<'a, DerivedItemType>;
}
Expand description

Defines abstractions specific to [Uni] channels

Required Methods§

source

fn create_stream( self: &Arc<Self> ) -> (MutinyStream<'a, ItemType, Self, DerivedItemType>, u32)where Self: ChannelConsumer<'a, DerivedItemType>,

Returns a Stream (and its stream_id) able to receive elements sent through this channel.
If called more than once, each Stream will receive a different element – “consumer pattern”.
Currently panics if called more times than allowed by [Uni]’s MAX_STREAMS

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, ItemType, OgreAllocatorType, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelUni<'a, ItemType, OgreUnique<ItemType, OgreAllocatorType>> for reactive_mutiny::uni::channels::zero_copy::atomic::Atomic<'a, ItemType, OgreAllocatorType, BUFFER_SIZE, MAX_STREAMS>where ItemType: Debug + Send + Sync, OgreAllocatorType: OgreAllocator<ItemType> + 'a + Send + Sync,

source§

impl<'a, ItemType, OgreAllocatorType, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelUni<'a, ItemType, OgreUnique<ItemType, OgreAllocatorType>> for reactive_mutiny::uni::channels::zero_copy::full_sync::FullSync<'a, ItemType, OgreAllocatorType, BUFFER_SIZE, MAX_STREAMS>where ItemType: Debug + Send + Sync, OgreAllocatorType: OgreAllocator<ItemType> + 'a + Send + Sync,

source§

impl<'a, ItemType, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelUni<'a, ItemType, ItemType> for reactive_mutiny::uni::channels::movable::atomic::Atomic<'a, ItemType, BUFFER_SIZE, MAX_STREAMS>where ItemType: 'a + Send + Sync + Debug + Default,

source§

impl<'a, ItemType, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelUni<'a, ItemType, ItemType> for Crossbeam<'a, ItemType, BUFFER_SIZE, MAX_STREAMS>where ItemType: 'a + Send + Sync + Debug,

source§

impl<'a, ItemType, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelUni<'a, ItemType, ItemType> for reactive_mutiny::uni::channels::movable::full_sync::FullSync<'a, ItemType, BUFFER_SIZE, MAX_STREAMS>where ItemType: Send + Sync + Debug + Default + 'a,