Trait reactive_messaging::prelude::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§
sourcefn create_stream(
self: &Arc<Self>
) -> (MutinyStream<'a, ItemType, Self, DerivedItemType>, u32)where
Self: ChannelConsumer<'a, DerivedItemType>,
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.