Trait ChannelUni

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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: BoundedOgreAllocator<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: BoundedOgreAllocator<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,