pub struct BroadcastHub;Implementations§
Source§impl BroadcastHub
impl BroadcastHub
Sourcepub fn sink<T: Clone + Send + 'static>(
buffer_size: usize,
) -> Sink<T, BroadcastHubConsumerSource<T>>
pub fn sink<T: Clone + Send + 'static>( buffer_size: usize, ) -> Sink<T, BroadcastHubConsumerSource<T>>
Materializes a reusable source for dynamically attaching consumers.
As in Akka, one producer adapts to the slowest active consumer unless callers add their own buffering or dropping stages around the materialized consumer sources.
Unlike Akka, Datum blocks upstream immediately when there are zero consumers instead of
pre-buffering up to buffer_size elements.
Sourcepub fn sink_starting_after<T: Clone + Send + 'static>(
start_after_nr_of_consumers: usize,
buffer_size: usize,
) -> Sink<T, BroadcastHubConsumerSource<T>>
pub fn sink_starting_after<T: Clone + Send + 'static>( start_after_nr_of_consumers: usize, buffer_size: usize, ) -> Sink<T, BroadcastHubConsumerSource<T>>
Delays upstream consumption until at least start_after_nr_of_consumers consumers attach.
Auto Trait Implementations§
impl Freeze for BroadcastHub
impl RefUnwindSafe for BroadcastHub
impl Send for BroadcastHub
impl Sync for BroadcastHub
impl Unpin for BroadcastHub
impl UnsafeUnpin for BroadcastHub
impl UnwindSafe for BroadcastHub
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage