Trait ChannelConsumer

Source
pub trait ChannelConsumer<'a, DerivedItemType: 'a + Debug> {
    // Required methods
    fn consume(&self, stream_id: u32) -> Option<DerivedItemType>;
    fn keep_stream_running(&self, stream_id: u32) -> bool;
    fn register_stream_waker(&self, stream_id: u32, waker: &Waker);
    fn drop_resources(&self, stream_id: u32);
}
Expand description

Source of events for MutinyStream.

Required Methods§

Source

fn consume(&self, stream_id: u32) -> Option<DerivedItemType>

Delivers the next event, whenever the Stream wants it.
IMPLEMENTORS: use #[inline(always)]

Source

fn keep_stream_running(&self, stream_id: u32) -> bool

Returns false if the Stream has been signaled to end its operations, causing it to report “out-of-elements” as soon as possible.
IMPLEMENTORS: use #[inline(always)]

Source

fn register_stream_waker(&self, stream_id: u32, waker: &Waker)

Shares, to implementors concern, how stream_id may be awaken.
IMPLEMENTORS: use #[inline(always)]

Source

fn drop_resources(&self, stream_id: u32)

Reports no more elements will be required through [provide()].
IMPLEMENTORS: use #[inline(always)]

Implementors§

Source§

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

Source§

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

Source§

impl<'a, ItemType: 'a + Debug, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelConsumer<'a, ItemType> for reactive_mutiny::uni::channels::movable::crossbeam::Crossbeam<'a, ItemType, BUFFER_SIZE, MAX_STREAMS>

Source§

impl<'a, ItemType: 'a + Send + Sync + Debug + Default, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelConsumer<'a, Arc<ItemType>> for reactive_mutiny::multi::channels::arc::atomic::Atomic<'a, ItemType, BUFFER_SIZE, MAX_STREAMS>

Source§

impl<'a, ItemType: 'a + Send + Sync + Debug + Default, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelConsumer<'a, Arc<ItemType>> for reactive_mutiny::multi::channels::arc::full_sync::FullSync<'a, ItemType, BUFFER_SIZE, MAX_STREAMS>

Source§

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

Source§

impl<'a, ItemType: 'a + Send + Sync + Debug, OgreAllocatorType: BoundedOgreAllocator<ItemType> + 'a + Sync + Send, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelConsumer<'a, OgreArc<ItemType, OgreAllocatorType>> for reactive_mutiny::multi::channels::ogre_arc::atomic::Atomic<'a, ItemType, OgreAllocatorType, BUFFER_SIZE, MAX_STREAMS>

Source§

impl<'a, ItemType: 'a + Send + Sync + Debug, OgreAllocatorType: BoundedOgreAllocator<ItemType> + 'a + Sync + Send, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelConsumer<'a, OgreArc<ItemType, OgreAllocatorType>> for reactive_mutiny::multi::channels::ogre_arc::full_sync::FullSync<'a, ItemType, OgreAllocatorType, BUFFER_SIZE, MAX_STREAMS>

Source§

impl<'a, ItemType: 'a + Send + Sync + Debug, const BUFFER_SIZE: usize, const MAX_STREAMS: usize> ChannelConsumer<'a, Arc<ItemType>> for reactive_mutiny::multi::channels::arc::crossbeam::Crossbeam<'a, ItemType, BUFFER_SIZE, MAX_STREAMS>

Source§

impl<'a, ItemType: 'a + Send + Sync + Debug, const MAX_STREAMS: usize> ChannelConsumer<'a, &'static ItemType> for MmapLog<'a, ItemType, MAX_STREAMS>

Source§

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