[−][src]Trait flo_stream::MessagePublisher
Trait that provides functions for publishing messages to subscribers
Associated Types
Loading content...Required methods
fn subscribe(&mut self) -> Subscriber<Self::Message>
Creates a subscription to this publisher
Any future messages sent here will also be sent to this subscriber.
fn when_ready(&mut self) -> BoxFuture<'static, MessageSender<Self::Message>>
Reserves a space for a message with the subscribers, returning when it's ready
fn when_empty(&mut self) -> BoxFuture<'static, ()>
Waits until all subscribers have consumed all pending messages
Provided methods
fn publish(&mut self, message: Self::Message) -> BoxFuture<'static, ()>
Publishes a message to the subscribers of this object
Implementors
impl<Message: 'static + Send + Clone> MessagePublisher for BlockingPublisher<Message>
[src]
type Message = Message
fn subscribe(&mut self) -> Subscriber<Message>
[src]
fn when_ready(&mut self) -> BoxFuture<'static, MessageSender<Message>>
[src]
Reserves a space for a message with the subscribers, returning when it's ready
fn when_empty(&mut self) -> BoxFuture<'static, ()>
[src]
Waits until all subscribers have consumed all pending messages
impl<Message: 'static + Send + Clone> MessagePublisher for ExpiringPublisher<Message>
[src]
type Message = Message
fn subscribe(&mut self) -> Subscriber<Message>
[src]
Subscribes to this publisher
Subscribers only receive messages sent to the publisher after they are created.
fn when_ready(&mut self) -> BoxFuture<'static, MessageSender<Message>>
[src]
Reserves a space for a message with the subscribers, returning when it's ready
fn when_empty(&mut self) -> BoxFuture<'static, ()>
[src]
Waits until all subscribers have consumed all pending messages
impl<Message: 'static + Send + Clone> MessagePublisher for Publisher<Message>
[src]
type Message = Message
fn subscribe(&mut self) -> Subscriber<Message>
[src]
Subscribes to this publisher
Subscribers only receive messages sent to the publisher after they are created.
fn when_ready(&mut self) -> BoxFuture<'static, MessageSender<Message>>
[src]
Reserves a space for a message with the subscribers, returning when it's ready
fn when_empty(&mut self) -> BoxFuture<'static, ()>
[src]
Waits until all subscribers have consumed all pending messages
impl<Message: 'static + Send + Clone> MessagePublisher for SinglePublisher<Message>
[src]
type Message = Message
fn subscribe(&mut self) -> Subscriber<Message>
[src]
Subscribes to this publisher
Subscribers only receive messages sent to the publisher after they are created.
fn when_ready(&mut self) -> BoxFuture<'static, MessageSender<Message>>
[src]
Reserves a space for a message with the subscribers, returning when it's ready
fn when_empty(&mut self) -> BoxFuture<'static, ()>
[src]
Waits until all subscribers have consumed all pending messages